summaryrefslogtreecommitdiff
path: root/includes/HttpServer.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-29 19:18:42 -0800
committerPixel <pixel@nobis-crew.org>2011-11-29 19:18:42 -0800
commit637fd157a03142438353346ec9b6da76b41870ff (patch)
treeacc0075cc4bc705cbd8e1a43f1833e68121d09ce /includes/HttpServer.h
parent14dc0cfcab678fafd5774d33884a40d5a5972421 (diff)
Getting rid of the std::pair; they are ugly as hell.
Diffstat (limited to 'includes/HttpServer.h')
-rw-r--r--includes/HttpServer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/HttpServer.h b/includes/HttpServer.h
index 227faa4..6c97799 100644
--- a/includes/HttpServer.h
+++ b/includes/HttpServer.h
@@ -22,7 +22,9 @@ class HttpServer {
public:
Action(const Regex & regex, const Regex & host = Regexes::any) : m_regex(regex), m_host(host), m_refCount(0) { }
~Action() { Assert(m_refCount == 0); }
- typedef std::pair<Regex::Captures, Regex::Captures> ActionMatch;
+ struct ActionMatch {
+ Regex::Captures uri, host;
+ };
ActionMatch matches(const char * uri, const char * host);
void unref() { if (Atomic::Decrement(&m_refCount) == 0) delete this; }
void ref() { Atomic::Increment(&m_refCount); }
@@ -41,7 +43,10 @@ class HttpServer {
void setLocal(const char * local) { Assert(!m_started); m_local = local; }
void registerAction(Action * action);
void flushAllActions();
- typedef std::pair<Action *, Action::ActionMatch> ActionFound;
+ struct ActionFound {
+ Action * action;
+ Action::ActionMatch matches;
+ };
ActionFound findAction(const char * uri, const char * host);
private:
bool m_started;