diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/skycpt/KmpSearch.cpp | 4 | ||||
-rw-r--r-- | tools/skycpt/KmpSearch.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/skycpt/KmpSearch.cpp b/tools/skycpt/KmpSearch.cpp index c70a0a77d8..4f561ba309 100644 --- a/tools/skycpt/KmpSearch.cpp +++ b/tools/skycpt/KmpSearch.cpp @@ -92,7 +92,7 @@ __declspec(naked) void __fastcall KmpSearch::init(const char *subStr) { } } -__declspec(naked) char * __fastcall KmpSearch::search(const char *str) { +__declspec(naked) const char * __fastcall KmpSearch::search(const char *str) { __asm { push esi push edi @@ -160,7 +160,7 @@ void __fastcall KmpSearch::init(const char *subStr) { strcpy(_subStr, subStr); } -char * __fastcall KmpSearch::search(const char *str) { +const char * __fastcall KmpSearch::search(const char *str) { return strstr(str, _subStr); } diff --git a/tools/skycpt/KmpSearch.h b/tools/skycpt/KmpSearch.h index ddf151046b..97ec1ca7c8 100644 --- a/tools/skycpt/KmpSearch.h +++ b/tools/skycpt/KmpSearch.h @@ -30,7 +30,7 @@ class KmpSearch { public: void __fastcall init(const char *subStr); - char * __fastcall search(const char *str); + const char * __fastcall search(const char *str); //private: char _retarget[256], _subStr[256]; unsigned long _strLen; |