diff options
Diffstat (limited to 'sca-cpp/trunk/kernel/fstream.hpp')
-rw-r--r-- | sca-cpp/trunk/kernel/fstream.hpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/sca-cpp/trunk/kernel/fstream.hpp b/sca-cpp/trunk/kernel/fstream.hpp index 5ea9df2d62..4f7f5152aa 100644 --- a/sca-cpp/trunk/kernel/fstream.hpp +++ b/sca-cpp/trunk/kernel/fstream.hpp @@ -78,6 +78,14 @@ public: ofstream(const ofstream& os) : file(os.file), owner(false) { } + const ofstream& operator=(const ofstream& os) { + if(this == &os) + return *this; + file = os.file; + owner = false; + return *this; + } + ~ofstream() { if (!owner) return; @@ -127,6 +135,14 @@ public: ifstream(const ifstream& is) : file(is.file), owner(false) { } + const ifstream& operator=(const ifstream& is) { + if(this == &is) + return *this; + file = is.file; + owner = false; + return *this; + } + ~ifstream() { if (!owner) return; @@ -351,7 +367,7 @@ const bool debug_isLogging() { * Log a debug message. */ const bool debugLog(const string& msg) { - gc_scoped_pool(); + gc_scoped_pool p; cdebug << msg << endl; return true; } @@ -360,7 +376,7 @@ const bool debugLog(const string& msg) { * Log a debug message and a value. */ template<typename V> const bool debugLog(const V& v, const string& msg) { - gc_scoped_pool(); + gc_scoped_pool p; cdebug << msg << ": " << v << endl; return true; } @@ -369,7 +385,7 @@ template<typename V> const bool debugLog(const V& v, const string& msg) { * Log a debug message and two values. */ template<typename V, typename W> const bool debugLog(const V& v, const W& w, const string& msg) { - gc_scoped_pool(); + gc_scoped_pool p; cdebug << msg << ": " << v << " : " << w << endl; return true; } |