Skip to content

Commit e64ab20

Browse files
committed
fix iterator conversion ?
1 parent 427e0b0 commit e64ab20

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

loader/include/Geode/c++stl/gnustl.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ namespace gd {
109109
using unordered_set = geode::stl::unordered_set<Value, Hash, Pred, Alloc>;
110110
};
111111

112+
template <>
113+
struct std::__ndk1::iterator_traits<typename gd::vector<char>::iterator> : std::__ndk1::iterator_traits<char*> {};
114+
112115
#elif defined(GEODE_IS_IOS)
113116
namespace gd {
114117
class GEODE_DLL string {

loader/include/Geode/c++stl/gnustl/stl_iterator.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
793793
const _Iterator&
794794
base() const _GLIBCXX_NOEXCEPT
795795
{ return _M_current; }
796+
797+
// geode addition
798+
operator ::std::__wrap_iter<_Iterator> () {
799+
return *reinterpret_cast<::std::__wrap_iter<_Iterator>*>(this);
800+
}
796801
};
797802

798803
// Note: In what follows, the left- and right-hand-side iterators are

0 commit comments

Comments
 (0)