diff --git a/src/OpenFOAM/primitives/strings/word/wordIOList.C b/src/OpenFOAM/primitives/strings/word/wordIOList.C index ede987af53..58456cb0ac 100644 --- a/src/OpenFOAM/primitives/strings/word/wordIOList.C +++ b/src/OpenFOAM/primitives/strings/word/wordIOList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,12 +38,17 @@ namespace Foam } -void Foam::printTable(const List& wll, Ostream& os) +void Foam::printTable +( + const List& wll, + List& columnWidth, + Ostream& os +) { if (!wll.size()) return; // Find the maximum word length for each column - List columnWidth(wll[0].size(), string::size_type(0)); + columnWidth.setSize(wll[0].size(), string::size_type(0)); forAll(columnWidth, j) { forAll(wll, i) @@ -75,4 +80,11 @@ void Foam::printTable(const List& wll, Ostream& os) } +void Foam::printTable(const List& wll, Ostream& os) +{ + List columnWidth; + printTable(wll, columnWidth, os); +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/strings/word/wordIOList.H b/src/OpenFOAM/primitives/strings/word/wordIOList.H index c560a33a95..da9d5aa426 100644 --- a/src/OpenFOAM/primitives/strings/word/wordIOList.H +++ b/src/OpenFOAM/primitives/strings/word/wordIOList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,6 +43,7 @@ namespace Foam typedef IOList wordListIOList; // Print word list list as a table + void printTable(const List&, List&, Ostream&); void printTable(const List&, Ostream&); }