diff options
Diffstat (limited to 'sca-cpp/trunk/components/filedb')
-rw-r--r-- | sca-cpp/trunk/components/filedb/filedb.cpp | 4 | ||||
-rw-r--r-- | sca-cpp/trunk/components/filedb/filedb.hpp | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/sca-cpp/trunk/components/filedb/filedb.cpp b/sca-cpp/trunk/components/filedb/filedb.cpp index 21b509a3b7..8644a78574 100644 --- a/sca-cpp/trunk/components/filedb/filedb.cpp +++ b/sca-cpp/trunk/components/filedb/filedb.cpp @@ -102,8 +102,8 @@ private: */ const failable<value> start(const list<value>& params) { // Connect to the configured database and table - const value dbname = ((lambda<value(list<value>)>)car(params))(list<value>()); - const value format = ((lambda<value(list<value>)>)cadr(params))(list<value>()); + const value dbname = ((lambda<value(const list<value>&)>)car(params))(list<value>()); + const value format = ((lambda<value(const list<value>&)>)cadr(params))(list<value>()); filedb::FileDB& db = *(new (gc_new<filedb::FileDB>()) filedb::FileDB(absdbname(dbname), format)); diff --git a/sca-cpp/trunk/components/filedb/filedb.hpp b/sca-cpp/trunk/components/filedb/filedb.hpp index a7151eade1..9c3017d0d8 100644 --- a/sca-cpp/trunk/components/filedb/filedb.hpp +++ b/sca-cpp/trunk/components/filedb/filedb.hpp @@ -57,7 +57,6 @@ const string absdbname(const string& name) { class FileDB { public: FileDB() : owner(false) { - debug("filedb::filedb"); } FileDB(const string& name, const string& format) : owner(true), name(absdbname(name)), format(format) { @@ -69,8 +68,17 @@ public: debug("filedb::filedb::copy"); } + const FileDB& operator=(const FileDB& c) { + debug("filedb::filedb::operator="); + if(this == &c) + return *this; + owner = false; + name = c.name; + format = c.format; + return *this; + } + ~FileDB() { - debug("filedb::~filedb"); } private: |