MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / LoadData

Method LoadData

src/discord/SettingsManager.cpp:21–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void SettingsManager::LoadData(const uint8_t* data, size_t sz)
22{
23 using namespace Protobuf;
24 ObjectBaseMessage* pMsg = new ObjectBaseMessage;
25 pMsg->SetDecodingHint(CreateHint()); // gonna get deleted below
26
27 try
28 {
29 DecodeBlock(data, sz, pMsg);
30 m_pSettingsMessage->MergeWith(pMsg);
31 m_pSettingsMessage->MarkClean();
32
33 delete pMsg;
34 }
35 catch (Protobuf::ErrorCode code)
36 {
37 delete pMsg;
38 GetFrontend()->OnProtobufError(code);
39 }
40}
41
42void SettingsManager::FlushSettings()
43{

Callers 1

LoadDataBase64Method · 0.45

Calls 6

DecodeBlockFunction · 0.85
GetFrontendFunction · 0.85
SetDecodingHintMethod · 0.80
MergeWithMethod · 0.80
OnProtobufErrorMethod · 0.80
MarkCleanMethod · 0.45

Tested by

no test coverage detected