mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 06:25:20 -04:00
strat: compat with gcc 11
This commit is contained in:
parent
4f16106702
commit
21f3d29df7
11 changed files with 26 additions and 21 deletions
|
@ -58,7 +58,7 @@ namespace ams::kvdb {
|
|||
|
||||
/* Getters. */
|
||||
size_t GetLength() const {
|
||||
return strnlen(this->buffer, N);
|
||||
return util::Strnlen(this->buffer, N);
|
||||
}
|
||||
|
||||
const char *Get() const {
|
||||
|
@ -72,7 +72,7 @@ namespace ams::kvdb {
|
|||
/* Setters. */
|
||||
void Set(const char *s) {
|
||||
/* Ensure string can fit in our buffer. */
|
||||
CheckLength(strnlen(s, N));
|
||||
CheckLength(util::Strnlen(s, N));
|
||||
std::strncpy(this->buffer, s, N);
|
||||
this->buffer[N - 1] = 0;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ namespace ams::kvdb {
|
|||
/* Append to existing. */
|
||||
void Append(const char *s) {
|
||||
const size_t length = GetLength();
|
||||
CheckLength(length + strnlen(s, N));
|
||||
CheckLength(length + util::Strnlen(s, N));
|
||||
std::strncat(this->buffer, s, N - length - 1);
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ namespace ams::kvdb {
|
|||
}
|
||||
|
||||
bool EndsWith(const char *s) const {
|
||||
const size_t suffix_length = strnlen(s, N);
|
||||
const size_t suffix_length = util::Strnlen(s, N);
|
||||
const size_t length = GetLength();
|
||||
return suffix_length <= length && EndsWith(s, length - suffix_length);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace ams::tipc {
|
|||
constexpr inline u16 MethodId_CloseSession = 0xF;
|
||||
|
||||
class ObjectManagerBase {
|
||||
private:
|
||||
protected:
|
||||
struct Entry {
|
||||
util::TypedStorage<WaitableObject> object;
|
||||
os::WaitableHolderType waitable_holder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue