aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/XrmDatabaseHelper.hh11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/FbTk/XrmDatabaseHelper.hh b/src/FbTk/XrmDatabaseHelper.hh
index 4c8207a..6c8acb0 100644
--- a/src/FbTk/XrmDatabaseHelper.hh
+++ b/src/FbTk/XrmDatabaseHelper.hh
@@ -39,9 +39,9 @@ class XrmDatabaseHelper
39{ 39{
40public: 40public:
41 XrmDatabaseHelper(char const * filename=0) 41 XrmDatabaseHelper(char const * filename=0)
42 : m_database(0) 42 : m_database(0)
43 { if (filename != 0) load(filename); } 43 { if (filename != 0) load(filename); }
44 44
45 ~XrmDatabaseHelper() { 45 ~XrmDatabaseHelper() {
46 close(); 46 close();
47 } 47 }
@@ -49,7 +49,7 @@ public:
49 /// assignment operator 49 /// assignment operator
50 XrmDatabaseHelper& operator=(const XrmDatabase& database) { 50 XrmDatabaseHelper& operator=(const XrmDatabase& database) {
51 if (m_database!=0) 51 if (m_database!=0)
52 XrmDestroyDatabase(m_database); 52 close();
53 m_database = database; 53 m_database = database;
54 return *this; 54 return *this;
55 } 55 }
@@ -69,11 +69,12 @@ public:
69 m_database = 0; 69 m_database = 0;
70 } 70 }
71 } 71 }
72
72 bool operator == (const XrmDatabase& database) { return m_database == database; } 73 bool operator == (const XrmDatabase& database) { return m_database == database; }
73 XrmDatabase & operator*(void) { return m_database; } 74 XrmDatabase & operator*() { return m_database; }
74 75
75private: 76private:
76 XrmDatabase m_database; 77 XrmDatabase m_database;
77}; 78};
78 79
79} // namespace FbTk 80} // namespace FbTk