From d489bcc2cba7c454874ae09e2e1df5d9dc6958aa Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Wed, 18 Dec 2013 18:10:39 -0800 Subject: Removing Atomic.h and all volatiles. --- includes/HttpServer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/HttpServer.h') diff --git a/includes/HttpServer.h b/includes/HttpServer.h index 55950cb..d044e92 100644 --- a/includes/HttpServer.h +++ b/includes/HttpServer.h @@ -2,8 +2,8 @@ #include #include +#include -#include #include #include #include @@ -52,13 +52,13 @@ class HttpServer { 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); } + void unref() { if (--m_refCount == 0) delete this; } + void ref() { ++m_refCount; } void registerMe(HttpServer * server) { server->registerAction(this); } virtual bool Do(HttpServer * server, Http::Request & req, ActionMatch & match, IO out) throw (GeneralException) = 0; private: const Regex m_regex, m_host; - volatile int m_refCount; + std::atomic m_refCount; Action(const Action &) = delete; Action & operator=(const Action &) = delete; }; -- cgit v1.2.3