1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Remove unnecessary bool return types

This commit is contained in:
Jude Melton-Houghton 2022-11-23 17:46:20 -05:00
parent 7c21347a40
commit 8b26bab37d
9 changed files with 20 additions and 34 deletions

View file

@ -381,34 +381,30 @@ ModStorageDatabaseFiles::ModStorageDatabaseFiles(const std::string &savedir):
{
}
bool ModStorageDatabaseFiles::getModEntries(const std::string &modname, StringMap *storage)
void ModStorageDatabaseFiles::getModEntries(const std::string &modname, StringMap *storage)
{
Json::Value *meta = getOrCreateJson(modname);
if (!meta)
return false;
return;
const Json::Value::Members attr_list = meta->getMemberNames();
for (const auto &it : attr_list) {
Json::Value attr_value = (*meta)[it];
(*storage)[it] = attr_value.asString();
}
return true;
}
bool ModStorageDatabaseFiles::getModKeys(const std::string &modname,
void ModStorageDatabaseFiles::getModKeys(const std::string &modname,
std::vector<std::string> *storage)
{
Json::Value *meta = getOrCreateJson(modname);
if (!meta)
return false;
return;
std::vector<std::string> keys = meta->getMemberNames();
storage->reserve(storage->size() + keys.size());
for (std::string &key : keys)
storage->push_back(std::move(key));
return true;
}
bool ModStorageDatabaseFiles::getModEntry(const std::string &modname,