| 196 | return good; |
| 197 | } |
| 198 | else if (overflows()) |
| 199 | { |
| 200 | WarningInFunction |
| 201 | << "Overall number of elements of CompactIOList of size " |
| 202 | << this->size() << " overflows the representation of a label" |
| 203 | << endl << " Switching to ascii writing" << endl; |
| 204 | |
| 205 | // Change type to be non-compact format type |
| 206 | const word oldTypeName = typeName; |
| 207 | |
| 208 | const_cast<word&>(typeName) = IOList<T>::typeName; |
| 209 | |
| 210 | bool good = regIOobject::writeObject(IOstream::ASCII, ver, cmp, valid); |
| 211 | |
| 212 | // Change type back |
| 213 | const_cast<word&>(typeName) = oldTypeName; |
| 214 | |
| 215 | return good; |
| 216 | } |
| 217 | else |
| 218 | { |
| 219 | return regIOobject::writeObject(fmt, ver, cmp, valid); |
no test coverage detected