From: José Fonseca Date: Fri, 9 Sep 2011 22:37:48 +0000 (+0100) Subject: Eliminate Trace::File::filename(). X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=90c80a024172cc3b957ba38fca3253eb14a4ea08;p=apitrace Eliminate Trace::File::filename(). Unused, and meaningless for pipes. --- diff --git a/trace_file.cpp b/trace_file.cpp index b05dcea..f48c1aa 100644 --- a/trace_file.cpp +++ b/trace_file.cpp @@ -42,12 +42,11 @@ using namespace Trace; File::File(const std::string &filename, File::Mode mode) - : m_filename(filename), - m_mode(mode), + : m_mode(mode), m_isOpened(false) { - if (!m_filename.empty()) { - open(m_filename, m_mode); + if (!filename.empty()) { + open(filename, m_mode); } } diff --git a/trace_file.hpp b/trace_file.hpp index 7214d78..4b1b70d 100644 --- a/trace_file.hpp +++ b/trace_file.hpp @@ -59,8 +59,6 @@ public: bool isOpened() const; File::Mode mode() const; - std::string filename() const; - bool open(const std::string &filename, File::Mode mode); bool write(const void *buffer, size_t length); bool read(void *buffer, size_t length); @@ -84,7 +82,6 @@ protected: virtual int rawPercentRead() = 0; protected: - std::string m_filename; File::Mode m_mode; bool m_isOpened; }; @@ -99,11 +96,6 @@ inline File::Mode File::mode() const return m_mode; } -inline std::string File::filename() const -{ - return m_filename; -} - inline bool File::open(const std::string &filename, File::Mode mode) { if (m_isOpened) {