summaryrefslogtreecommitdiff
path: root/include/anope.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
committerAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
commitfb7fef7a849342ab8463743497e781c5c3e6ae88 (patch)
tree5d230a68b6eed70c7b4f718410dd62fea779654c /include/anope.h
parent36602224b8b1a11326a224779d16bcb12f0ed532 (diff)
Optimizations of much of the more commonly used code
Diffstat (limited to 'include/anope.h')
-rw-r--r--include/anope.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/anope.h b/include/anope.h
index 9bf0f982d..8e24d12da 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -255,7 +255,7 @@ namespace Anope
{
Anope::string new_string = *this;
for (size_type i = 0; i < new_string.length(); ++i)
- new_string[i] = std::tolower(new_string[i], Anope::casemap);
+ new_string[i] = Anope::tolower(new_string[i]);
return new_string;
}
@@ -266,7 +266,7 @@ namespace Anope
{
Anope::string new_string = *this;
for (size_type i = 0; i < new_string.length(); ++i)
- new_string[i] = std::toupper(new_string[i], Anope::casemap);
+ new_string[i] = Anope::toupper(new_string[i]);
return new_string;
}
@@ -547,15 +547,12 @@ class CoreExport sepstream
/** Original string.
*/
Anope::string tokens;
- /** Last position of a seperator token
- */
- Anope::string::iterator last_starting_position;
- /** Current string position
- */
- Anope::string::iterator n;
/** Seperator value
*/
char sep;
+ /** Current string position
+ */
+ size_t pos;
public:
/** Create a sepstream and fill it with the provided data
*/
@@ -570,7 +567,7 @@ class CoreExport sepstream
/** Gets token number 'num' from the stream
* @param token The token is placed here
* @param num The token number to featch
- * @return True if the token was able to be detched
+ * @return True if the token was able to be fetched
*/
bool GetToken(Anope::string &token, int num);
@@ -588,7 +585,7 @@ class CoreExport sepstream
/** Gets token number 'num' from the stream and all remaining tokens.
* @param token The token is placed here
* @param num The token number to featch
- * @return True if the token was able to be detched
+ * @return True if the token was able to be fetched
*/
bool GetTokenRemainder(Anope::string &token, int num);