------------------------------------------------------------------------------ Internal function to read in a string up to 256 characters. Returns zero if there was an error.
| 280 | // Internal function to read in a string up to 256 characters. |
| 281 | // Returns zero if there was an error. |
| 282 | int vtkDataReader::ReadString(char (&result)[256]) |
| 283 | { |
| 284 | // Force the parameter to be seen as a 256-byte array rather than a decayed |
| 285 | // pointer. |
| 286 | char(&result_ref)[256] = *reinterpret_cast<char(*)[256]>(result); |
| 287 | this->IS->width(256); |
| 288 | *this->IS >> result_ref; |
| 289 | if (this->IS->fail()) |
| 290 | { |
| 291 | return 0; |
| 292 | } |
| 293 | return 1; |
| 294 | } |
| 295 | |
| 296 | //------------------------------------------------------------------------------ |
| 297 | // Internal function to read in an integer value. |
no test coverage detected