| 56 | |
| 57 | |
| 58 | void 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 | |
| 76 | Foam::label Foam::ensightFile::subDirWidth() |
no test coverage detected