MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / load

Method load

src/RichText/TextBox.cpp:58–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void TextData::load(cereal::PortableBinaryInputArchive& a) {
59 a(paragraphs);
60 uint32_t tStyleModCount;
61 a(tStyleModCount);
62 tStyleMods.clear();
63 for(uint32_t i = 0; i < tStyleModCount; i++) {
64 auto& modsInPos = tStyleMods.emplace_back();
65 uint16_t modsInPosSize;
66 a(modsInPos.pos, modsInPosSize);
67 for(uint16_t j = 0; j < modsInPosSize; j++) {
68 TextStyleModifier::ModifierType modType;
69 a(modType);
70 auto modifier = TextStyleModifier::allocate_modifier(modType);
71 a(*modifier);
72 modsInPos.mods[modType] = modifier;
73 }
74 }
75}
76
77TextData TextData::deserialize_string(std::string& s) {
78 if(s.empty()) {

Callers 1

get_display_dataMethod · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected