Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make Globals::config_ const.

  • Loading branch information...
commit aa0bc9e8d0e76afcb307c3a2555a7cd16925e0e3 1 parent 43d72c9
@avm authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 include/details/globals.h
  2. +2 −2 library/globals.cpp
View
6 include/details/globals.h
@@ -36,10 +36,10 @@ class RequestsThreadPool;
class Globals : private boost::noncopyable {
public:
- Globals(Config *config);
+ Globals(const Config *config);
virtual ~Globals();
- Config* config() const;
+ const Config* config() const;
typedef std::map<std::string, boost::shared_ptr<RequestsThreadPool> > ThreadPoolMap;
@@ -59,7 +59,7 @@ class Globals : private boost::noncopyable {
private:
ThreadPoolMap pools_;
- Config* config_;
+ const Config* config_;
std::auto_ptr<Loader> loader_;
std::auto_ptr<HandlerSet> handlerSet_;
std::auto_ptr<ComponentSet> componentSet_;
View
4 library/globals.cpp
@@ -18,7 +18,7 @@
namespace fastcgi
{
-Globals::Globals(Config *config) : config_(config), loader_(new Loader()),
+Globals::Globals(const Config *config) : config_(config), loader_(new Loader()),
handlerSet_(new HandlerSet()), componentSet_(new ComponentSet()), logger_(NULL)
{
loader_->init(config);
@@ -58,7 +58,7 @@ Globals::logger() const {
return logger_;
}
-Config*
+const Config*
Globals::config() const {
return config_;
}
Please sign in to comment.
Something went wrong with that request. Please try again.