]> git.tdb.fi Git - libs/core.git/commitdiff
Remove unnecessary std:: qualifiers
authorMikko Rasa <tdb@tdb.fi>
Sun, 29 Aug 2021 08:59:32 +0000 (11:59 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 29 Aug 2021 22:42:03 +0000 (01:42 +0300)
source/core/getopt.cpp
source/debug/exceptiontrace.cpp
source/debug/profiler.cpp
source/fs/path.cpp
source/fs/stat.cpp
source/io/buffered.cpp
source/io/zlibcompressed.cpp
source/stringcodec/utf16.cpp
source/strings/lexicalcast.cpp
source/strings/utils.cpp

index 9040f5d43ec684ecd83d11113931051b4ab13876..0f8886ad746a542e3a40b36ed8e7c2ddcd0c1e19 100644 (file)
@@ -315,7 +315,7 @@ string GetOpt::generate_help() const
 }
 
 
 }
 
 
-GetOpt::OptionImpl::OptionImpl(char s, const std::string &l, const Store &t, ArgType a):
+GetOpt::OptionImpl::OptionImpl(char s, const string &l, const Store &t, ArgType a):
        shrt(s),
        lng(l),
        arg_type(a),
        shrt(s),
        lng(l),
        arg_type(a),
index 30df4b6f353718c687774878c04e0f4252b4e9b6..fb72223a84df776ee7cbd30cc40bdf92ce0ff86f 100644 (file)
@@ -61,11 +61,11 @@ const Backtrace &get_exception_trace()
 } // namespace Msp
 
 #if defined(WITH_EXCEPTION_TRACE) && !defined(_WIN32) && defined(__GLIBC__)
 } // namespace Msp
 
 #if defined(WITH_EXCEPTION_TRACE) && !defined(_WIN32) && defined(__GLIBC__)
-extern "C" void __cxa_throw(void *exc, std::type_info *type, void (*dest) (void *))
+extern "C" void __cxa_throw(void *exc, type_info *type, void (*dest) (void *))
 {
        if(trace_enabled)
                get_thread_backtrace() = Msp::Debug::Backtrace::create();
        orig_cxa_throw(exc, type, dest);
 {
        if(trace_enabled)
                get_thread_backtrace() = Msp::Debug::Backtrace::create();
        orig_cxa_throw(exc, type, dest);
-       std::terminate();
+       terminate();
 }
 #endif
 }
 #endif
index c33aebf275fb46ba1e79bedaa8c601fae5cc78b2..c4c880b70241c826d87e7db7ba3598bc8034be84 100644 (file)
@@ -30,7 +30,7 @@ void Profiler::set_period(unsigned p)
        }
 }
 
        }
 }
 
-void Profiler::add_scope(const std::string &name)
+void Profiler::add_scope(const string &name)
 {
        if(!scopes.count(name))
        {
 {
        if(!scopes.count(name))
        {
index bd107f1378f128e813a646b9ad7d4a05516de2d7..353c63eca182d97ed1c5daa5e2c15bab7857665e 100644 (file)
@@ -8,7 +8,7 @@ using namespace std;
 namespace {
 
 #ifdef _WIN32
 namespace {
 
 #ifdef _WIN32
-inline bool is_windows_drive(const std::string &p)
+inline bool is_windows_drive(const string &p)
 { return (p.size()==2 && ((p[0]>='A' && p[0]<='Z') || (p[0]>='a' && p[0]<='z')) && p[1]==':'); }
 #endif
 
 { return (p.size()==2 && ((p[0]>='A' && p[0]<='Z') || (p[0]>='a' && p[0]<='z')) && p[1]==':'); }
 #endif
 
index f4566ae8b6ef8363cd68f709f2d66924137a58a2..2269ae1a016fcf5b1857cb499fd4f21a24d62820 100644 (file)
@@ -50,14 +50,14 @@ Stat::~Stat()
        delete priv;
 }
 
        delete priv;
 }
 
-const std::string &Stat::get_owner() const
+const string &Stat::get_owner() const
 {
        if(priv && owner_info.owner.empty())
                priv->fill_owner_info(owner_info);
        return owner_info.owner;
 }
 
 {
        if(priv && owner_info.owner.empty())
                priv->fill_owner_info(owner_info);
        return owner_info.owner;
 }
 
-const std::string &Stat::get_group() const
+const string &Stat::get_group() const
 {
        if(priv && owner_info.group.empty())
                priv->fill_owner_info(owner_info);
 {
        if(priv && owner_info.group.empty())
                priv->fill_owner_info(owner_info);
index 55c69a635cf69d0a6b8f41b0f2eec67a028b16e7..77a5f45cef353e2771842f0b197f7cc48d443f35 100644 (file)
@@ -150,7 +150,7 @@ size_t Buffered::put(char c)
                return do_write(&c, 1);
 }
 
                return do_write(&c, 1);
 }
 
-bool Buffered::getline(std::string &line)
+bool Buffered::getline(string &line)
 {
        set_op(M_READ);
 
 {
        set_op(M_READ);
 
index f477bdc46f180e3446f5ee898470c9519ad0fdff..2220bcc46f063372698915a95e1ad1a45d1f74f0 100644 (file)
@@ -8,7 +8,7 @@ using namespace std;
 namespace Msp {
 namespace IO {
 
 namespace Msp {
 namespace IO {
 
-zlib_error::zlib_error(const std::string &w, int c):
+zlib_error::zlib_error(const string &w, int c):
 #ifdef WITH_ZLIB
        runtime_error(w+": "+zError(c)),
 #else
 #ifdef WITH_ZLIB
        runtime_error(w+": "+zError(c)),
 #else
index fed994ef9e76d03dd6deaae0ee531911bd9da4e8..09fb3b6f76c80a214b882bbf105405b68a5ec9a2 100644 (file)
@@ -47,7 +47,7 @@ void Utf16::Encoder::encode_char(unichar ch, string &buf)
        }
 }
 
        }
 }
 
-void Utf16::Encoder::transliterate(unichar, std::string &buf)
+void Utf16::Encoder::transliterate(unichar, string &buf)
 {
        if(endian==LITTLE)
                buf.append("\xFD\xFF", 2);
 {
        if(endian==LITTLE)
                buf.append("\xFD\xFF", 2);
index f4b58302fe154447753f399bf81e80d86ce091cd..8789544bbb355f14f421ccd9a6ea5f761a25e256 100644 (file)
@@ -108,12 +108,12 @@ string int_to_str(T v, const Fmt &f)
 }
 
 template<typename T>
 }
 
 template<typename T>
-T str_to_int(const std::string &s, const Fmt &f)
+T str_to_int(const string &s, const Fmt &f)
 {
        if(s.empty())
                throw lexical_error("conversion of '' to integer");
 
 {
        if(s.empty())
                throw lexical_error("conversion of '' to integer");
 
-       std::string::const_iterator i = s.begin();
+       string::const_iterator i = s.begin();
 
        // See if the input starts with a sign
        bool neg = false;
 
        // See if the input starts with a sign
        bool neg = false;
@@ -389,7 +389,7 @@ T str_to_flt(const string &s, const Fmt &)
        if(s.empty())
                throw lexical_error("conversion of '' to floating-point");
 
        if(s.empty())
                throw lexical_error("conversion of '' to floating-point");
 
-       std::string::const_iterator i = s.begin();
+       string::const_iterator i = s.begin();
 
        // See if the input starts with a sign
        bool neg = false;
 
        // See if the input starts with a sign
        bool neg = false;
@@ -564,7 +564,7 @@ void operator>>(const LexicalConverter &c, char &v)
                v = str_to_int<char>(c.get(), c.get_fmt());
        else
        {
                v = str_to_int<char>(c.get(), c.get_fmt());
        else
        {
-               const std::string &s = c.get();
+               const string &s = c.get();
                if(s.empty())
                        throw lexical_error("conversion of '' to character");
                if(s.size()>1)
                if(s.empty())
                        throw lexical_error("conversion of '' to character");
                if(s.size()>1)
index 80e59f07a6cb5802eb741aa870a0498e2308fea0..1b4cad080dee85950740b58de822484be2c2214e 100644 (file)
@@ -40,7 +40,7 @@ vector<string> do_split(const string &str, const string &sep, int max_split)
        return result;
 }
 
        return result;
 }
 
-bool check_str(const std::string &str, int (*pred)(int))
+bool check_str(const string &str, int (*pred)(int))
 {
        for(string::const_iterator i=str.begin(); i!=str.end(); ++i)
                if(!pred(*i))
 {
        for(string::const_iterator i=str.begin(); i!=str.end(); ++i)
                if(!pred(*i))
@@ -144,7 +144,7 @@ string join(const string &str1, const string &sep, const string &str2)
        return append(result, sep, str2);
 }
 
        return append(result, sep, str2);
 }
 
-string c_unescape(const std::string &str)
+string c_unescape(const string &str)
 {
        bool escape = false;
        unsigned numeric_type = 0;
 {
        bool escape = false;
        unsigned numeric_type = 0;