MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / subDirWidth

Function subDirWidth

src/conversion/ensight/file/ensightFile.C:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58void Foam::ensightFile::subDirWidth(const label n)
59{
60 // enforce max limit to avoid buffer overflow in subDir()
61 if (n < 1 || n > 31)
62 {
63 return;
64 }
65
66 // appropriate printf format
67 std::ostringstream oss;
68 oss << "%0" << n << "d";
69 dirFmt_ = oss.str();
70
71 // set mask accordingly
72 mask_.resize(n, '*');
73}
74
75
76Foam::label Foam::ensightFile::subDirWidth()

Callers 2

mainFunction · 0.85
ensightFile.CFile · 0.85

Calls 2

strMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected