• R/O
  • SSH
  • HTTPS

peframework: Commit


Commit MetaInfo

Revision36 (tree)
Zeit2020-10-30 22:28:47
Autorquiret

Log Message

- adjustments for the new Eir SDK version

Ändern Zusammenfassung

Diff

--- library/include/peloader.h (revision 35)
+++ library/include/peloader.h (revision 36)
@@ -15,6 +15,7 @@
1515 #include <sdk/MemoryUtils.h>
1616 #include <sdk/MemoryUtils.stream.h>
1717 #include <sdk/UniChar.h>
18+#include <sdk/StringUtils.h>
1819
1920 #include "peloader.common.h"
2021
@@ -1694,46 +1695,37 @@
16941695 private:
16951696 struct _compareNamedEntry
16961697 {
1697- static inline bool str_is_less_than( const peString <char16_t>& left, const peString <char16_t>& right )
1698+ static inline eir::eCompResult compare_values( const PEResourceItem *left, const PEResourceItem *right )
16981699 {
1699- return FixedStringCompare(
1700- left.GetConstString(), left.GetLength(),
1701- right.GetConstString(), right.GetLength(),
1702- true
1703- ) == eir::eCompResult::LEFT_LESS;
1700+ return lexical_string_comparator <true>::compare_values( left->name, right->name );
17041701 }
17051702
1706- static inline bool is_less_than( const PEResourceItem *left, const PEResourceItem *right )
1703+ static inline eir::eCompResult compare_values( const peString <char16_t>& left, const PEResourceItem *right )
17071704 {
1708- return str_is_less_than( left->name, right->name );
1705+ return lexical_string_comparator <true>::compare_values( left, right->name );
17091706 }
17101707
1711- static inline bool is_less_than( const peString <char16_t>& left, const PEResourceItem *right )
1708+ static inline eir::eCompResult compare_values( const PEResourceItem *left, const peString <char16_t>& right )
17121709 {
1713- return str_is_less_than( left, right->name );
1710+ return lexical_string_comparator <true>::compare_values( left->name, right );
17141711 }
1715-
1716- static inline bool is_less_than( const PEResourceItem *left, const peString <char16_t>& right )
1717- {
1718- return str_is_less_than( left->name, right );
1719- }
17201712 };
17211713
17221714 struct _compareIDEntry
17231715 {
1724- static inline bool is_less_than( const PEResourceItem *left, const PEResourceItem *right )
1716+ static inline eir::eCompResult compare_values( const PEResourceItem *left, const PEResourceItem *right ) noexcept
17251717 {
1726- return ( left->identifier < right->identifier );
1718+ return eir::DefaultValueCompare( left->identifier, right->identifier );
17271719 }
17281720
1729- static inline bool is_less_than( std::uint16_t left, const PEResourceItem *right )
1721+ static inline eir::eCompResult compare_values( std::uint16_t left, const PEResourceItem *right ) noexcept
17301722 {
1731- return ( left < right->identifier );
1723+ return eir::DefaultValueCompare( left, right->identifier );
17321724 }
17331725
1734- static inline bool is_less_than( const PEResourceItem *left, std::uint16_t right )
1726+ static inline eir::eCompResult compare_values( const PEResourceItem *left, std::uint16_t right ) noexcept
17351727 {
1736- return ( left->identifier < right );
1728+ return eir::DefaultValueCompare( left->identifier, right );
17371729 }
17381730 };
17391731
--- library/src/peloader.memory.cpp (revision 35)
+++ library/src/peloader.memory.cpp (revision 36)
@@ -6,7 +6,7 @@
66 #include <NativeExecutive/CExecutiveManager.h>
77 #endif //PEFRAMEWORK_NATIVE_EXECUTIVE
88
9-void* PEGlobalStaticAllocator::Allocate( void *refPtr, size_t memSize, size_t alignment )
9+void* PEGlobalStaticAllocator::Allocate( void *refPtr, size_t memSize, size_t alignment ) noexcept
1010 {
1111 #ifdef PEFRAMEWORK_NATIVE_EXECUTIVE
1212 return NatExecGlobalStaticAlloc::Allocate( refPtr, memSize, alignment );
@@ -15,7 +15,7 @@
1515 #endif //PEFRAMEWORK_NATIVE_EXECUTIVE
1616 }
1717
18-bool PEGlobalStaticAllocator::Resize( void *refPtr, void *memPtr, size_t memSize )
18+bool PEGlobalStaticAllocator::Resize( void *refPtr, void *memPtr, size_t memSize ) noexcept
1919 {
2020 #ifdef PEFRAMEWORK_NATIVE_EXECUTIVE
2121 return NatExecGlobalStaticAlloc::Resize( refPtr, memPtr, memSize );
@@ -24,7 +24,7 @@
2424 #endif //PEFRAMEWORK_NATIVE_EXECUTIVE
2525 }
2626
27-void PEGlobalStaticAllocator::Free( void *refPtr, void *memPtr )
27+void PEGlobalStaticAllocator::Free( void *refPtr, void *memPtr ) noexcept
2828 {
2929 #ifdef PEFRAMEWORK_NATIVE_EXECUTIVE
3030 NatExecGlobalStaticAlloc::Free( refPtr, memPtr );
Show on old repository browser