mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Misc changes (#1513)
* Start moving to string_view where possible * Rework readdir object to use atomic load/store
This commit is contained in:
parent
2101ef5bcc
commit
6ac7f389c5
61 changed files with 841 additions and 745 deletions
|
|
@ -23,38 +23,39 @@
|
|||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
namespace str
|
||||
std::string
|
||||
str::to(const bool bool_)
|
||||
{
|
||||
std::string
|
||||
to(const bool bool_)
|
||||
{
|
||||
return (bool_ ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string
|
||||
to(const int int_)
|
||||
{
|
||||
return fmt::format("{}",int_);
|
||||
}
|
||||
|
||||
std::string
|
||||
to(const uint64_t uint64_)
|
||||
{
|
||||
return fmt::format("{}",uint64_);
|
||||
}
|
||||
|
||||
std::string
|
||||
to(const std::string &s_)
|
||||
{
|
||||
return s_;
|
||||
}
|
||||
|
||||
std::string
|
||||
to(const fs::Path &path_)
|
||||
{
|
||||
return path_.string();
|
||||
}
|
||||
return (bool_ ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string
|
||||
str::to(const int int_)
|
||||
{
|
||||
return fmt::format("{}",int_);
|
||||
}
|
||||
|
||||
std::string
|
||||
str::to(const uint64_t uint64_)
|
||||
{
|
||||
return fmt::format("{}",uint64_);
|
||||
}
|
||||
|
||||
std::string
|
||||
str::to(const int64_t int64_)
|
||||
{
|
||||
return fmt::format("{}",int64_);
|
||||
}
|
||||
|
||||
std::string
|
||||
str::to(const std::string &s_)
|
||||
{
|
||||
return s_;
|
||||
}
|
||||
|
||||
std::string
|
||||
str::to(const std::filesystem::path &path_)
|
||||
{
|
||||
return path_.string();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue