- adjustments for the new Eir SDK version
@@ -15,6 +15,7 @@ | ||
15 | 15 | #include <sdk/MemoryUtils.h> |
16 | 16 | #include <sdk/MemoryUtils.stream.h> |
17 | 17 | #include <sdk/UniChar.h> |
18 | +#include <sdk/StringUtils.h> | |
18 | 19 | |
19 | 20 | #include "peloader.common.h" |
20 | 21 |
@@ -1694,46 +1695,37 @@ | ||
1694 | 1695 | private: |
1695 | 1696 | struct _compareNamedEntry |
1696 | 1697 | { |
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 ) | |
1698 | 1699 | { |
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 ); | |
1704 | 1701 | } |
1705 | 1702 | |
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 ) | |
1707 | 1704 | { |
1708 | - return str_is_less_than( left->name, right->name ); | |
1705 | + return lexical_string_comparator <true>::compare_values( left, right->name ); | |
1709 | 1706 | } |
1710 | 1707 | |
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 ) | |
1712 | 1709 | { |
1713 | - return str_is_less_than( left, right->name ); | |
1710 | + return lexical_string_comparator <true>::compare_values( left->name, right ); | |
1714 | 1711 | } |
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 | - } | |
1720 | 1712 | }; |
1721 | 1713 | |
1722 | 1714 | struct _compareIDEntry |
1723 | 1715 | { |
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 | |
1725 | 1717 | { |
1726 | - return ( left->identifier < right->identifier ); | |
1718 | + return eir::DefaultValueCompare( left->identifier, right->identifier ); | |
1727 | 1719 | } |
1728 | 1720 | |
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 | |
1730 | 1722 | { |
1731 | - return ( left < right->identifier ); | |
1723 | + return eir::DefaultValueCompare( left, right->identifier ); | |
1732 | 1724 | } |
1733 | 1725 | |
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 | |
1735 | 1727 | { |
1736 | - return ( left->identifier < right ); | |
1728 | + return eir::DefaultValueCompare( left->identifier, right ); | |
1737 | 1729 | } |
1738 | 1730 | }; |
1739 | 1731 |
@@ -6,7 +6,7 @@ | ||
6 | 6 | #include <NativeExecutive/CExecutiveManager.h> |
7 | 7 | #endif //PEFRAMEWORK_NATIVE_EXECUTIVE |
8 | 8 | |
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 | |
10 | 10 | { |
11 | 11 | #ifdef PEFRAMEWORK_NATIVE_EXECUTIVE |
12 | 12 | return NatExecGlobalStaticAlloc::Allocate( refPtr, memSize, alignment ); |
@@ -15,7 +15,7 @@ | ||
15 | 15 | #endif //PEFRAMEWORK_NATIVE_EXECUTIVE |
16 | 16 | } |
17 | 17 | |
18 | -bool PEGlobalStaticAllocator::Resize( void *refPtr, void *memPtr, size_t memSize ) | |
18 | +bool PEGlobalStaticAllocator::Resize( void *refPtr, void *memPtr, size_t memSize ) noexcept | |
19 | 19 | { |
20 | 20 | #ifdef PEFRAMEWORK_NATIVE_EXECUTIVE |
21 | 21 | return NatExecGlobalStaticAlloc::Resize( refPtr, memPtr, memSize ); |
@@ -24,7 +24,7 @@ | ||
24 | 24 | #endif //PEFRAMEWORK_NATIVE_EXECUTIVE |
25 | 25 | } |
26 | 26 | |
27 | -void PEGlobalStaticAllocator::Free( void *refPtr, void *memPtr ) | |
27 | +void PEGlobalStaticAllocator::Free( void *refPtr, void *memPtr ) noexcept | |
28 | 28 | { |
29 | 29 | #ifdef PEFRAMEWORK_NATIVE_EXECUTIVE |
30 | 30 | NatExecGlobalStaticAlloc::Free( refPtr, memPtr ); |