summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/Resource.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh
index 95f649e..7a756e8 100644
--- a/src/FbTk/Resource.hh
+++ b/src/FbTk/Resource.hh
@@ -168,14 +168,14 @@ template <typename T>
168class Resource:public Resource_base 168class Resource:public Resource_base
169{ 169{
170public: 170public:
171 typedef T Type;
171 Resource(ResourceManager &rm, T val, 172 Resource(ResourceManager &rm, T val,
172 const std::string &name, const std::string &altname): 173 const std::string &name, const std::string &altname):
173 Resource_base(name, altname), 174 Resource_base(name, altname),
174 m_value(val), m_defaultval(val), 175 m_value(val), m_defaultval(val),
175 m_rm(rm) 176 m_rm(rm) {
176 { 177 m_rm.addResource(*this); // add this to resource handler
177 m_rm.addResource(*this); // add this to resource handler 178 }
178 }
179 virtual ~Resource() { 179 virtual ~Resource() {
180 m_rm.removeResource(*this); // remove this from resource handler 180 m_rm.removeResource(*this); // remove this from resource handler
181 } 181 }