From 8cf2cb5d225f4ff00592faea9fa7201574a9342f Mon Sep 17 00:00:00 2001 From: vng Date: Wed, 29 Dec 2010 23:57:36 +0200 Subject: [PATCH] Fix compilation (2nd try). --- coding/file_writer.cpp | 4 ++-- coding/file_writer.hpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/coding/file_writer.cpp b/coding/file_writer.cpp index 6952af8bdd..3eef5c1560 100644 --- a/coding/file_writer.cpp +++ b/coding/file_writer.cpp @@ -7,9 +7,9 @@ #include "../../base/start_mem_debug.hpp" -FileWriter::FileWriter(FileWriter & rhs) +FileWriter::FileWriter(FileWriter const & rhs) { - m_pFileData.swap(rhs.m_pFileData); + m_pFileData.swap(const_cast(rhs).m_pFileData); } FileWriter::FileWriter(string const & fileName, FileWriter::Op op) diff --git a/coding/file_writer.hpp b/coding/file_writer.hpp index ef155d4e3a..fd246ffa3d 100644 --- a/coding/file_writer.hpp +++ b/coding/file_writer.hpp @@ -20,9 +20,10 @@ public: // Append to a file. Writing operations append data at the end of the file. // The file is created if it does not exist. // Seek should not be called, if file is opened for append. - OP_APPEND = 3}; + OP_APPEND = 3 + }; - FileWriter(FileWriter & rhs); + FileWriter(FileWriter const & rhs); explicit FileWriter(string const & fileName, Op operation = OP_WRITE_TRUNCATE); ~FileWriter();