File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#include " ../DevTools.hpp"
44#include < misc/cpp/imgui_stdlib.h>
55#include < Geode/binding/CCMenuItemSpriteExtra.hpp>
6+ #include " ../platform/utils.hpp"
67
78using namespace geode ::prelude;
89
Original file line number Diff line number Diff line change 22
33#ifdef GEODE_IS_MACOS
44
5- #include " platform .hpp"
5+ #include " utils .hpp"
66
77#include < Geode/utils/string.hpp>
88#include < array>
1212#include < dlfcn.h>
1313#include < cxxabi.h>
1414#include < algorithm>
15+ #include < fmt/core.h>
1516
1617#include < mach-o/dyld_images.h>
1718#include < mach-o/dyld.h>
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ class $modify(CCEGLView) {
4646 }
4747};
4848
49+ #include " utils.hpp"
50+
4951std::string formatAddressIntoOffsetImpl (uintptr_t addr) {
5052 HMODULE mod;
5153
Original file line number Diff line number Diff line change @@ -110,14 +110,3 @@ void GLRenderCtx::end() {
110110 glFlush ();
111111}
112112
113- std::string formatAddressIntoOffset (uintptr_t addr) {
114- static std::unordered_map<uintptr_t , std::string> formatted;
115- auto it = formatted.find (addr);
116- if (it != formatted.end ()) {
117- return it->second ;
118- } else {
119- auto const txt = formatAddressIntoOffsetImpl (addr);
120- formatted.insert ({ addr, txt });
121- return txt;
122- }
123- }
Original file line number Diff line number Diff line change @@ -26,7 +26,3 @@ class GLRenderCtx final {
2626 bool begin ();
2727 void end ();
2828};
29-
30- std::string formatAddressIntoOffsetImpl (uintptr_t addr);
31-
32- std::string formatAddressIntoOffset (uintptr_t addr);
Original file line number Diff line number Diff line change 1+ #include " utils.hpp"
2+
3+ #include < unordered_map>
4+
5+ std::string formatAddressIntoOffset (uintptr_t addr) {
6+ static std::unordered_map<uintptr_t , std::string> formatted;
7+ auto it = formatted.find (addr);
8+ if (it != formatted.end ()) {
9+ return it->second ;
10+ } else {
11+ auto const txt = formatAddressIntoOffsetImpl (addr);
12+ formatted.insert ({ addr, txt });
13+ return txt;
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include < string>
4+ #include < stdint.h>
5+
6+ std::string formatAddressIntoOffset (uintptr_t addr);
7+
8+ std::string formatAddressIntoOffsetImpl (uintptr_t addr);
You can’t perform that action at this time.
0 commit comments