From 7e265b05f440ed81b80f2de496c9d13221a69fe0 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 10 Dec 2013 08:52:51 +0100 Subject: Simplified types for better readability. Use appropriate types (size_t, byte_t...). Minor warning fixes. --- src/utility/stringProxy.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/utility/stringProxy.cpp') diff --git a/src/utility/stringProxy.cpp b/src/utility/stringProxy.cpp index 3320affb..67c96816 100644 --- a/src/utility/stringProxy.cpp +++ b/src/utility/stringProxy.cpp @@ -45,19 +45,19 @@ stringProxy::stringProxy(const stringProxy& s) } -stringProxy::stringProxy(const string_type& s, const size_type start, const size_type end) +stringProxy::stringProxy(const string& s, const size_t start, const size_t end) : m_buffer(s), m_start(start), - m_end(end == std::numeric_limits ::max() ? s.length() : end) + m_end(end == std::numeric_limits ::max() ? s.length() : end) { } -void stringProxy::set(const string_type& s, const size_type start, const size_type end) +void stringProxy::set(const string& s, const size_t start, const size_t end) { m_buffer = s; m_start = start; - if (end == std::numeric_limits ::max()) + if (end == std::numeric_limits ::max()) m_end = s.length(); else m_end = end; @@ -81,7 +81,7 @@ stringProxy& stringProxy::operator=(const stringProxy& s) } -stringProxy& stringProxy::operator=(const string_type& s) +stringProxy& stringProxy::operator=(const string& s) { m_buffer = s; m_start = 0; @@ -91,12 +91,12 @@ stringProxy& stringProxy::operator=(const string_type& s) } -void stringProxy::extract(outputStream& os, const size_type start, const size_type end, +void stringProxy::extract(outputStream& os, const size_t start, const size_t end, utility::progressListener* progress) const { - size_type len = 0; + size_t len = 0; - if (end == std::numeric_limits ::max()) + if (end == std::numeric_limits ::max()) len = m_end - start - m_start; else if (end > start) len = end - start; @@ -114,19 +114,19 @@ void stringProxy::extract(outputStream& os, const size_type start, const size_ty } -stringProxy::size_type stringProxy::length() const +size_t stringProxy::length() const { return (m_end - m_start); } -stringProxy::size_type stringProxy::start() const +size_t stringProxy::start() const { return (m_start); } -stringProxy::size_type stringProxy::end() const +size_t stringProxy::end() const { return (m_end); } -- cgit