Compare commits

...

3 Commits

Author SHA1 Message Date
Maschell
562c7490cf Fix move operator for WUPSConfigItem 2024-03-29 13:20:39 +01:00
Maschell
3b0e4bf4c5 Fix move operator for WUPSConfigCategory 2024-03-29 13:20:39 +01:00
Maschell
702580152f StorageAPI: Make sure to call noexcept version of CreateSubItem in GetOrCreateSubItem 2024-03-29 13:20:39 +01:00
3 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,8 @@ public:
WUPSConfigCategory &operator=(WUPSConfigCategory &&src) noexcept {
if (this != &src) {
src.mHandle = {};
this->mHandle = src.mHandle;
src.mHandle = {};
}
return *this;
}

View File

@ -21,7 +21,8 @@ public:
WUPSConfigItem &operator=(WUPSConfigItem &&src) noexcept {
if (this != &src) {
src.mHandle = {};
this->mHandle = src.mHandle;
src.mHandle = {};
}
return *this;
}

View File

@ -85,7 +85,7 @@ std::optional<WUPSStorageSubItem> WUPSStorageSubItem::GetOrCreateSubItem(std::st
wups_storage_item outItem = {};
err = WUPSStorageAPI_GetSubItem(mHandle, key.data(), &outItem);
if (err == WUPS_STORAGE_ERROR_NOT_FOUND) {
return CreateSubItem(key);
return CreateSubItem(key, err);
}
return WUPSStorageSubItem(outItem);
}