| 173 | } |
| 174 | |
| 175 | void IdBlock::IsFinalized(bool finalized, std::streambuf& buffer, |
| 176 | uint16_t standard_flags, uint16_t custom_flags) { |
| 177 | if (finalized) { |
| 178 | file_identifier_ = "MDF "; |
| 179 | standard_flags_ = 0; |
| 180 | custom_flags_ = 0; |
| 181 | } else { |
| 182 | file_identifier_ = "UnFinMF "; |
| 183 | standard_flags_ = standard_flags; |
| 184 | custom_flags_ = custom_flags; |
| 185 | } |
| 186 | |
| 187 | // Check if the file also needs update |
| 188 | if (FilePosition() == 0) { |
| 189 | SetFirstFilePosition(buffer); |
| 190 | WriteStr(buffer, file_identifier_, 8); |
| 191 | SetFilePosition(buffer, 60); |
| 192 | WriteNumber(buffer, standard_flags_); |
| 193 | WriteNumber(buffer, custom_flags_); |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | bool IdBlock::IsFinalized(uint16_t &standard_flags, |
| 198 | uint16_t &custom_flags) const { |