diff --git a/src/ctemplate/template_cache.h.in b/src/ctemplate/template_cache.h.in index e3a56b9..99af467 100644 --- a/src/ctemplate/template_cache.h.in +++ b/src/ctemplate/template_cache.h.in @@ -45,6 +45,7 @@ @ac_google_start_namespace@ class FileStat; @ac_google_end_namespace@ +class Mutex; class TemplateCacheUnittest; @ac_windows_dllexport_defines@ @@ -355,8 +356,8 @@ class @ac_windows_dllexport@ TemplateCache { // (which they will probably get at via a call to ClearCache()). TemplateCallMap* get_template_calls_; - mutable class Mutex* mutex_; - mutable class Mutex* search_path_mutex_; + Mutex* const mutex_; + Mutex* const search_path_mutex_; // Can't invoke copy constructor or assignment operator TemplateCache(const TemplateCache&); diff --git a/src/windows/ctemplate/template_cache.h b/src/windows/ctemplate/template_cache.h index 85ca47a..136a64e 100644 --- a/src/windows/ctemplate/template_cache.h +++ b/src/windows/ctemplate/template_cache.h @@ -45,6 +45,7 @@ namespace ctemplate { class FileStat; } +class Mutex; class TemplateCacheUnittest; // NOTE: if you are statically linking the template library into your binary @@ -365,8 +366,8 @@ class CTEMPLATE_DLL_DECL TemplateCache { // (which they will probably get at via a call to ClearCache()). TemplateCallMap* get_template_calls_; - mutable class Mutex* mutex_; - mutable class Mutex* search_path_mutex_; + Mutex* const mutex_; + Mutex* const search_path_mutex_; // Can't invoke copy constructor or assignment operator TemplateCache(const TemplateCache&);