}
-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),
} // 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);
- std::terminate();
+ terminate();
}
#endif
}
}
-void Profiler::add_scope(const std::string &name)
+void Profiler::add_scope(const string &name)
{
if(!scopes.count(name))
{
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
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;
}
-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);
return do_write(&c, 1);
}
-bool Buffered::getline(std::string &line)
+bool Buffered::getline(string &line)
{
set_op(M_READ);
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
}
}
-void Utf16::Encoder::transliterate(unichar, std::string &buf)
+void Utf16::Encoder::transliterate(unichar, string &buf)
{
if(endian==LITTLE)
buf.append("\xFD\xFF", 2);
}
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");
- std::string::const_iterator i = s.begin();
+ string::const_iterator i = s.begin();
// See if the input starts with a sign
bool neg = false;
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;
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)
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))
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;