Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

drop thread_specific_ptr

no longer multi-threaded
  • Loading branch information...
commit c6702e89fdf31ca07cfbb99dc23f0eee5d04374b 1 parent fc2956b
@erikfrey erikfrey authored
Showing with 4 additions and 9 deletions.
  1. +4 −9 include/darner/net/request.h
View
13 include/darner/net/request.h
@@ -3,7 +3,6 @@
#include <string>
-#include <boost/thread/tss.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
@@ -47,14 +46,10 @@ class request_parser
bool parse(request& req, std::string::const_iterator begin, std::string::const_iterator end)
{
- if (!grammars_.get())
- grammars_.reset(new request_grammar());
- request_grammar& grammar = *grammars_;
-
- grammar.req = request();
- bool success = boost::spirit::qi::parse(begin, end, grammar) && (begin == end);
+ grammar_.req = request();
+ bool success = boost::spirit::qi::parse(begin, end, grammar_) && (begin == end);
if (success)
- req = grammar.req;
+ req = grammar_.req;
return success;
}
@@ -67,7 +62,7 @@ class request_parser
private:
- boost::thread_specific_ptr<request_grammar> grammars_;
+ request_grammar grammar_;
};
} // darner
Please sign in to comment.
Something went wrong with that request. Please try again.