Note for self: -O1+ strips out expressions surrounded by assert()

This commit is contained in:
TheAssassin
2018-11-23 18:05:56 +01:00
parent b974f44ffd
commit ce097235f2

View File

@@ -173,12 +173,14 @@ namespace linuxdeploy {
DesktopFileEntry entry;
// this should never return false
assert(getEntry(section, key, entry));
auto entryExists = getEntry(section, key, entry);
assert(entryExists);
ldLog() << LD_WARNING << "Key exists, not modified:" << key << "(current value:" << entry.value() << LD_NO_SPACE << ")" << std::endl;
rv = false;
} else {
assert(!setEntry(section, std::move(DesktopFileEntry(key, value))));
auto entrySet = setEntry(section, DesktopFileEntry(key, value));
assert(entrySet);
}
};