From 8462403a776ac936ddf9cc4d8e96e86ce63711ff Mon Sep 17 00:00:00 2001 From: vng Date: Mon, 8 Apr 2013 16:08:12 +0300 Subject: [PATCH] Return file name by const reference in readers. --- coding/file_container.hpp | 2 +- coding/reader.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coding/file_container.hpp b/coding/file_container.hpp index 7dd669cdb3..ad7f64af80 100644 --- a/coding/file_container.hpp +++ b/coding/file_container.hpp @@ -99,7 +99,7 @@ public: } inline uint64_t GetFileSize() const { return m_source.Size(); } - inline string GetFileName() const { return m_source.GetName(); } + inline string const & GetFileName() const { return m_source.GetName(); } private: ReaderT m_source; diff --git a/coding/reader.hpp b/coding/reader.hpp index df33f77176..3fec27be31 100644 --- a/coding/reader.hpp +++ b/coding/reader.hpp @@ -147,7 +147,7 @@ public: virtual ModelReader * CreateSubReader(uint64_t pos, uint64_t size) const = 0; - inline string GetName() const { return m_name; } + inline string const & GetName() const { return m_name; } }; // Reader pointer class for data files. @@ -163,7 +163,7 @@ public: return m_p->CreateSubReader(pos, size); } - inline string GetName() const { return m_p->GetName(); } + inline string const & GetName() const { return m_p->GetName(); } };