diff --git a/Injector/Injector.cpp b/Injector/Injector.cpp index 118f504..fc43494 100644 --- a/Injector/Injector.cpp +++ b/Injector/Injector.cpp @@ -27,6 +27,21 @@ Injector* Injector::Get() Injector::Injector() { } +bool Injector::icompare_pred(const unsigned char a, const unsigned char b) +{ + return std::tolower(a) == std::tolower(b); +} + +bool Injector::icompare(const std::wstring& a, const std::wstring& b) const +{ + if (a.length() == b.length()) + { + return std::equal(b.begin(), b.end(), + a.begin(), icompare_pred); + } + return false; +} + // Injects a module (fully qualified path) via process id void Injector::InjectLib(DWORD ProcID, const std::wstring& Path) { diff --git a/Injector/Injector.h b/Injector/Injector.h index 3e80186..5e5100e 100644 --- a/Injector/Injector.h +++ b/Injector/Injector.h @@ -49,19 +49,7 @@ class Injector // Case-insensitive string comparison utility functions // - static bool icompare_pred(unsigned char a, unsigned char b) - { - return std::tolower(a) == std::tolower(b); - } + static bool icompare_pred(unsigned char a, unsigned char b); - bool icompare(std::wstring const& a, std::wstring const& b) const - { - if (a.length() == b.length()) { - return std::equal(b.begin(), b.end(), - a.begin(), icompare_pred); - } - else { - return false; - } - } + bool icompare(std::wstring const& a, std::wstring const& b) const; };