:-'Generic Commit'
All checks were successful
Build-Test-Publish / Build (push) Successful in 1m8s

This commit is contained in:
Your Name
2025-05-30 23:46:39 +12:00
parent 3cabf33e87
commit fd6cc5bef4
4 changed files with 38 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ namespace simple_object_storage
{
ScopeFileDeleter::ScopeFileDeleter(const std::filesystem::path &path) : path_(path), released_(false) {}
ScopeFileDeleter::~ScopeFileDeleter()
{
if (!released_)
@@ -25,4 +25,13 @@ namespace simple_object_storage
void ScopeFileDeleter::release() { released_ = true; }
std::string trim(const std::string &s)
{
size_t start = s.find_first_not_of(" \t\n\r\f\v");
if (start == std::string::npos)
return "";
size_t end = s.find_last_not_of(" \t\n\r\f\v");
return s.substr(start, end - start + 1);
}
}