mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
ams: fix compilation with gcc 13
This commit is contained in:
parent
ed9e60acb9
commit
1f5ec68a5c
8 changed files with 8 additions and 28 deletions
|
@ -257,7 +257,7 @@ namespace ams::kern {
|
|||
class KScopedAutoObject {
|
||||
NON_COPYABLE(KScopedAutoObject);
|
||||
private:
|
||||
template<typename U>
|
||||
template<typename U> requires std::derived_from<U, KAutoObject>
|
||||
friend class KScopedAutoObject;
|
||||
private:
|
||||
T *m_obj;
|
||||
|
|
|
@ -120,10 +120,6 @@ namespace ams::kern {
|
|||
return m_address == rhs;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE bool operator!=(uintptr_t rhs) const {
|
||||
return m_address != rhs;
|
||||
}
|
||||
|
||||
/* Allow getting the address explicitly, for use in accessors. */
|
||||
constexpr ALWAYS_INLINE uintptr_t GetValue() const {
|
||||
return m_address;
|
||||
|
|
|
@ -164,8 +164,9 @@ namespace ams::kern {
|
|||
};
|
||||
|
||||
|
||||
template<typename Derived, typename Base, bool SupportDynamicExpansion = false> requires std::derived_from<Base, KAutoObjectWithList>
|
||||
template<typename Derived, typename Base, bool SupportDynamicExpansion = false>
|
||||
class KAutoObjectWithSlabHeapAndContainer : public KAutoObjectWithSlabHeapBase<Derived, Base, SupportDynamicExpansion> {
|
||||
static_assert(std::derived_from<Base, KAutoObjectWithList>);
|
||||
private:
|
||||
static constinit inline KAutoObjectWithListContainer<Derived> s_container;
|
||||
public:
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ams::kern::svc {
|
|||
R_UNLESS(size < ams::kern::MainMemorySizeMax, svc::ResultInvalidSize());
|
||||
|
||||
/* Set the heap size. */
|
||||
KProcessAddress address;
|
||||
KProcessAddress address = Null<KProcessAddress>;
|
||||
R_TRY(GetCurrentProcess().GetPageTable().SetHeapSize(std::addressof(address), size));
|
||||
|
||||
/* Set the output. */
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace ams::sf::hipc {
|
|||
AMS_ABORT_UNLESS(ServerManagerBase::CanAnyManageMitmServers());
|
||||
|
||||
/* Clone the forward service. */
|
||||
std::shared_ptr<::Service> new_forward_service = std::move(ServerSession::CreateForwardService());
|
||||
std::shared_ptr<::Service> new_forward_service = ServerSession::CreateForwardService();
|
||||
R_ABORT_UNLESS(serviceClone(util::GetReference(m_session->m_forward_service).get(), new_forward_service.get()));
|
||||
R_ABORT_UNLESS(tagged_manager->RegisterMitmSession(server_handle, std::move(clone), std::move(new_forward_service)));
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ namespace ams::sf::hipc {
|
|||
R_ABORT_UNLESS(hipc::CreateSession(std::addressof(server_handle), std::addressof(client_handle)));
|
||||
|
||||
/* Register. */
|
||||
std::shared_ptr<::Service> new_forward_service = std::move(ServerSession::CreateForwardService());
|
||||
std::shared_ptr<::Service> new_forward_service = ServerSession::CreateForwardService();
|
||||
serviceCreate(new_forward_service.get(), new_forward_target);
|
||||
R_ABORT_UNLESS(m_manager->RegisterMitmSession(server_handle, std::move(object), std::move(new_forward_service)));
|
||||
|
||||
|
|
|
@ -144,10 +144,6 @@ namespace ams::util {
|
|||
return m_node == rhs.m_node;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE bool operator!=(const Iterator &rhs) const {
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE pointer operator->() const {
|
||||
return m_node;
|
||||
}
|
||||
|
@ -355,10 +351,6 @@ namespace ams::util {
|
|||
return m_iterator == rhs.m_iterator;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE bool operator!=(const Iterator &rhs) const {
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE pointer operator->() const {
|
||||
return std::addressof(Traits::GetParent(*m_iterator));
|
||||
}
|
||||
|
|
|
@ -94,10 +94,6 @@ namespace ams::util {
|
|||
return m_node == rhs.m_node;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE bool operator!=(const Iterator &rhs) const {
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE pointer operator->() const {
|
||||
return m_node;
|
||||
}
|
||||
|
@ -304,10 +300,6 @@ namespace ams::util {
|
|||
return m_impl == rhs.m_impl;
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE bool operator!=(const Iterator &rhs) const {
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
constexpr ALWAYS_INLINE pointer operator->() const {
|
||||
return Traits::GetParent(std::addressof(*m_impl));
|
||||
}
|
||||
|
|
|
@ -251,12 +251,11 @@ namespace ams::mitm::fs {
|
|||
using DirectoryTableWriter = TableWriter<DirectoryEntry>;
|
||||
using FileTableWriter = TableWriter<FileEntry>;
|
||||
|
||||
constexpr inline u32 CalculatePathHash(u32 parent, const char *_path, u32 start, size_t path_len) {
|
||||
const unsigned char *path = reinterpret_cast<const unsigned char *>(_path);
|
||||
constexpr inline u32 CalculatePathHash(u32 parent, const char *path, u32 start, size_t path_len) {
|
||||
u32 hash = parent ^ 123456789;
|
||||
for (size_t i = 0; i < path_len; i++) {
|
||||
hash = (hash >> 5) | (hash << 27);
|
||||
hash ^= path[start + i];
|
||||
hash ^= static_cast<unsigned char>(path[start + i]);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue