Changeset 65665 in vbox for trunk/src/VBox/Main/src-all
- Timestamp:
- Feb 7, 2017 2:14:42 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/QMTranslatorImpl.cpp
r63170 r65665 28 28 /* QM File Magic Number */ 29 29 static const size_t MagicLength = 16; 30 static const uint8_t Magic[MagicLength] = { 30 static const uint8_t Magic[MagicLength] = 31 { 31 32 0x3c, 0xb8, 0x64, 0x18, 0xca, 0xef, 0x9c, 0x95, 32 33 0xcd, 0x21, 0x1c, 0xbf, 0x60, 0xa1, 0xbd, 0xdd … … 235 236 { 236 237 case Messages: 237 parseMessages(stream, &hashSet, &messageArray, sLen);238 break;238 parseMessages(stream, &hashSet, &messageArray, sLen); 239 break; 239 240 case Hashes: 240 /* Only get size information to speed-up vector filling241 * if Hashes section goes in the file before Message section */242 m_messageArray.reserve(sLen >> 3);243 /* NB! NO BREAK HERE*/241 /* Only get size information to speed-up vector filling 242 * if Hashes section goes in the file before Message section */ 243 m_messageArray.reserve(sLen >> 3); 244 /* fall thru */ 244 245 case Context: 245 stream.seek(sLen);246 break;246 stream.seek(sLen); 247 break; 247 248 default: 248 throw QMException("Unkown section");249 throw QMException("Unkown section"); 249 250 } 250 251 } … … 303 304 static void parseMessageRecord(QMBytesStream &stream, QMMessage * const message) 304 305 { 305 while (!stream.hasFinished())306 while (!stream.hasFinished()) 306 307 { 307 308 uint8_t type = stream.read8(); 308 switch (type)309 switch (type) 309 310 { 310 311 case End: 311 return;312 return; 312 313 /* Ignored as obsolete */ 313 314 case Context16: 314 315 case SourceText16: 315 stream.seek(stream.read32());316 break;316 stream.seek(stream.read32()); 317 break; 317 318 case Translation: 318 319 { … … 322 323 } 323 324 case Hash: 324 message->hash = stream.read32();325 break;325 message->hash = stream.read32(); 326 break; 326 327 327 328 case SourceText: … … 347 348 348 349 default: 349 /* Ignore unknown block */350 LogRel(("QMTranslator::parseMessageRecord(): Unkown message block %x\n", type));351 break;350 /* Ignore unknown block */ 351 LogRel(("QMTranslator::parseMessageRecord(): Unkown message block %x\n", type)); 352 break; 352 353 } 353 354 }
Note:
See TracChangeset
for help on using the changeset viewer.