1
0

Remove unused function that fails to build with new C++

This commit is contained in:
Deve 2023-11-04 23:00:54 +01:00 committed by mckaygerhard
parent 0eb18780e4
commit 062f2e3613
3 changed files with 1 additions and 36 deletions

View File

@ -10,7 +10,7 @@ else
APP_CFLAGS := -g -D_DEBUG -O1 -fno-omit-frame-pointer
endif
APP_CFLAGS += -fexceptions -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
APP_CFLAGS += -fexceptions
APP_CXXFLAGS := $(APP_CFLAGS) -frtti -std=gnu++17 #-Werror=shorten-64-to-32

View File

@ -2185,7 +2185,6 @@
ENABLE_HARDENED_RUNTIME = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
"RUN_IN_PLACE=0",
"USE_GETTEXT=1",
"USE_CURL=1",
@ -2259,7 +2258,6 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"NDEBUG=1",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
"RUN_IN_PLACE=0",
"USE_GETTEXT=1",
"USE_CURL=1",

View File

@ -3857,38 +3857,5 @@ inline std::wostream& operator<<(std::wostream& out, const ustring16<TAlloc>& in
}
#endif
#ifndef USTRING_NO_STL
namespace unicode
{
//! Hashing algorithm for hashing a ustring. Used for things like unordered_maps.
//! Algorithm taken from std::hash<std::string>.
class hash : public std::unary_function<core::ustring, size_t>
{
public:
size_t operator()(const core::ustring& s) const
{
size_t ret = 2166136261U;
size_t index = 0;
size_t stride = 1 + s.size_raw() / 10;
core::ustring::const_iterator i = s.begin();
while (i != s.end())
{
// TODO: Don't force u32 on an x64 OS. Make it agnostic.
ret = 16777619U * ret ^ (size_t)s[(u32)index];
index += stride;
i += stride;
}
return (ret);
}
};
} // end namespace unicode
#endif
} // end namespace core
} // end namespace irr