summaryrefslogtreecommitdiff
path: root/server/src/queryparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/queryparser.cc')
-rw-r--r--server/src/queryparser.cc15
1 files changed, 1 insertions, 14 deletions
diff --git a/server/src/queryparser.cc b/server/src/queryparser.cc
index 0135515..abb41b5 100644
--- a/server/src/queryparser.cc
+++ b/server/src/queryparser.cc
@@ -26,14 +26,10 @@
*/
#include "queryparser.h"
-QueryParser::QueryParser(std::string document)
+QueryParser::QueryParser()
{
- this->document = document;
this->timestamp = 0;
- // Make sure we always contain a valid xml document.
- if(this->document == "") this->document = "<xml></xml>";
-
p = 0;
stack.push_back(&result);
}
@@ -72,15 +68,6 @@ void QueryParser::endTag(std::string name)
if(name == "group") stack.pop_back();
}
-// FIXME: This is *not* the optimal way to do this.
-int QueryParser::readData(char *data, size_t size)
-{
- size_t len = document.size() - p < size ? document.size() - p : size;
- strncpy(data, document.c_str() + p, len);
- p += len;
- return len;
-}
-
void QueryParser::parseError(char *buf, size_t len, std::string error, int lineno)
{
fprintf(stderr, "QueryParser error at line %d: %s\n", lineno, error.c_str());