mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 06:48:22 -04:00
strat: always use explicit result namespacing
This commit is contained in:
parent
303c6eb5f9
commit
b0e520112b
29 changed files with 237 additions and 237 deletions
|
@ -30,7 +30,7 @@ namespace ams::kvdb {
|
|||
u32 entry_count;
|
||||
|
||||
Result Validate() const {
|
||||
R_UNLESS(std::memcmp(this->magic, ArchiveHeaderMagic, sizeof(ArchiveHeaderMagic)) == 0, ResultInvalidKeyValue());
|
||||
R_UNLESS(std::memcmp(this->magic, ArchiveHeaderMagic, sizeof(ArchiveHeaderMagic)) == 0, kvdb::ResultInvalidKeyValue());
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace ams::kvdb {
|
|||
u32 value_size;
|
||||
|
||||
Result Validate() const {
|
||||
R_UNLESS(std::memcmp(this->magic, ArchiveEntryMagic, sizeof(ArchiveEntryMagic)) == 0, ResultInvalidKeyValue());
|
||||
R_UNLESS(std::memcmp(this->magic, ArchiveEntryMagic, sizeof(ArchiveEntryMagic)) == 0, kvdb::ResultInvalidKeyValue());
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
|
@ -68,8 +68,8 @@ namespace ams::kvdb {
|
|||
/* Reader functionality. */
|
||||
Result ArchiveReader::Peek(void *dst, size_t size) {
|
||||
/* Bounds check. */
|
||||
R_UNLESS(this->offset + size <= this->buffer.GetSize(), ResultInvalidKeyValue());
|
||||
R_UNLESS(this->offset < this->offset + size, ResultInvalidKeyValue());
|
||||
R_UNLESS(this->offset + size <= this->buffer.GetSize(), kvdb::ResultInvalidKeyValue());
|
||||
R_UNLESS(this->offset < this->offset + size, kvdb::ResultInvalidKeyValue());
|
||||
|
||||
std::memcpy(dst, this->buffer.Get() + this->offset, size);
|
||||
return ResultSuccess();
|
||||
|
@ -129,8 +129,8 @@ namespace ams::kvdb {
|
|||
/* Writer functionality. */
|
||||
Result ArchiveWriter::Write(const void *src, size_t size) {
|
||||
/* Bounds check. */
|
||||
R_UNLESS(this->offset + size <= this->buffer.GetSize(), ResultInvalidKeyValue());
|
||||
R_UNLESS(this->offset < this->offset + size, ResultInvalidKeyValue());
|
||||
R_UNLESS(this->offset + size <= this->buffer.GetSize(), kvdb::ResultInvalidKeyValue());
|
||||
R_UNLESS(this->offset < this->offset + size, kvdb::ResultInvalidKeyValue());
|
||||
|
||||
std::memcpy(this->buffer.Get() + this->offset, src, size);
|
||||
this->offset += size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue