diff options
author | linencloth <none@none> | 2010-10-21 16:56:51 +0200 |
---|---|---|
committer | linencloth <none@none> | 2010-10-21 16:56:51 +0200 |
commit | d9d1ec3670ce4498b22025973fa126e5e3c2ab48 (patch) | |
tree | 53f1ffd4ec3e3247f4b5af4bddf6207268b07eaf /src/server/shared/Utilities/Util.h | |
parent | f275f8b4b580b48f8ff7804d2079d6cd83842cda (diff) |
Core: optimize string splitting
- Mainly affects item loading performance
- Reduces guild loading time a lot
--HG--
branch : trunk
Diffstat (limited to 'src/server/shared/Utilities/Util.h')
-rwxr-xr-x | src/server/shared/Utilities/Util.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index c55da24fc80..8a49d7d9681 100755 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -24,9 +24,13 @@ #include <string> #include <vector> -typedef std::vector<std::string> Tokens; +struct Tokens: public std::vector<char*> +{ + Tokens(const std::string &src, const char sep, uint32 vectorReserve = 0); + ~Tokens() { delete m_str; } -Tokens StrSplit(const std::string &src, const std::string &sep); + char* m_str; +}; void stripLineInvisibleChars(std::string &src); |