1
0
Fork 0

BRIDGE: fix an oopsie

This commit is contained in:
Duncan Ogilvie 2020-07-11 20:39:55 +02:00
parent 3676f1ab75
commit ff1d5bd565
2 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,7 @@ public:
if(keyvalue.first.length())
appendLine(output, makeKeyValueText(keyvalue.first, keyvalue.second));
}
return output;
return std::move(output);
}
/**
@ -59,7 +59,7 @@ public:
lines.push_back(trim(curLine));
//parse lines
std::string section, key, value;
std::string section = "";
for(const auto & line : lines)
{
errorLine++;
@ -74,6 +74,8 @@ public:
case LineType::KeyValue:
{
std::string key;
std::string value;
if(!section.length() ||
!parseKeyValueLine(line, key, value) ||
!SetValue(section, key, value))
@ -110,7 +112,7 @@ public:
return false;
auto found = mSections.find(trimmedSection);
if(found != mSections.end())
found->second.emplace(std::move(trimmedKey), value);
found->second[std::move(trimmedKey)] = value;
else
{
KeyValueMap keyValueMap;
@ -177,7 +179,7 @@ public:
sections.reserve(mSections.size());
for(const auto & section : mSections)
sections.push_back(section.first);
return sections;
return std::move(sections);
}
/**

View File

@ -1842,7 +1842,6 @@ void CPUDump::asciiAddressDumpModeUpdatedSlot()
duint setting = 0;
mAsciiAddressDumpMode = BridgeSettingGetUint("Gui", "AsciiAddressDumpMode", &setting) && setting;
auto defaultView = (ViewEnum_t)ConfigUint("HexDump", "DefaultView");
printf("defaultView: %d\n", defaultView);
switch(defaultView)
{
case ViewAddress: