Reads and appends to the vector the next element of the serialization.
| 583 | } |
| 584 | // Reads and appends to the vector the next element of the serialization. |
| 585 | bool DeSerializeElement(bool swap, TFile* fp) { |
| 586 | inT8 non_null; |
| 587 | if (fp->FRead(&non_null, sizeof(non_null), 1) != 1) return false; |
| 588 | T* item = NULL; |
| 589 | if (non_null) { |
| 590 | item = new T; |
| 591 | if (!item->DeSerialize(swap, fp)) { |
| 592 | delete item; |
| 593 | return false; |
| 594 | } |
| 595 | this->push_back(item); |
| 596 | } else { |
| 597 | // Null elements should keep their place in the vector. |
| 598 | this->push_back(NULL); |
| 599 | } |
| 600 | return true; |
| 601 | } |
| 602 | // Skips the next element of the serialization. |
| 603 | static bool DeSerializeSkip(bool swap, TFile* fp) { |
| 604 | inT8 non_null; |
no test coverage detected