summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-05-16 15:50:08 +0200
committerattilamolnar <attilamolnar@hush.com>2013-05-18 21:09:31 +0200
commit801af5b47303cea3c77e3cf0188031e754f6ca15 (patch)
tree42564f43c8d37b8b88e912614421fa8cc48e557e
parent21eba8e86b3d7361bc9334b4e15e968ba095db76 (diff)
irc::tokenstream and irc::sepstream cleanup
irc::sepstream does not require virtual methods
-rw-r--r--include/hashcomp.h14
-rw-r--r--src/hashcomp.cpp8
2 files changed, 3 insertions, 19 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 4f7065081..1f1e541d3 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -301,10 +301,6 @@ namespace irc
*/
tokenstream(const std::string &source);
- /** Destructor
- */
- ~tokenstream();
-
/** Fetch the next token from the stream as a std::string
* @param token The next token available, or an empty string if none remain
* @return True if tokens are left to be read, false if the last token was just retrieved.
@@ -355,25 +351,21 @@ namespace irc
*/
sepstream(const std::string &source, char seperator);
- /** Destructor
- */
- virtual ~sepstream();
-
/** Fetch the next token from the stream
* @param token The next token from the stream is placed here
* @return True if tokens still remain, false if there are none left
*/
- virtual bool GetToken(std::string &token);
+ bool GetToken(std::string& token);
/** Fetch the entire remaining stream, without tokenizing
* @return The remaining part of the stream
*/
- virtual const std::string GetRemaining();
+ const std::string GetRemaining();
/** Returns true if the end of the stream has been reached
* @return True if the end of the stream has been reached, otherwise false
*/
- virtual bool StreamEnd();
+ bool StreamEnd();
};
/** A derived form of sepstream, which seperates on commas
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 9fded8b4b..b320f3546 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -245,10 +245,6 @@ irc::tokenstream::tokenstream(const std::string &source) : tokens(source), last_
n = tokens.begin();
}
-irc::tokenstream::~tokenstream()
-{
-}
-
bool irc::tokenstream::GetToken(std::string &token)
{
std::string::iterator lsp = last_starting_position;
@@ -361,10 +357,6 @@ bool irc::sepstream::StreamEnd()
return ((n + 1) == tokens.end());
}
-irc::sepstream::~sepstream()
-{
-}
-
irc::modestacker::modestacker(bool add) : adding(add)
{
sequence.clear();