Warnings provider clang-tidy fixes

This commit is contained in:
Dan Paulat 2025-02-01 11:33:30 -06:00
parent 549f7ece61
commit a8da035566
2 changed files with 15 additions and 18 deletions

View file

@ -2,9 +2,7 @@
#include <scwx/awips/text_product_file.hpp> #include <scwx/awips/text_product_file.hpp>
namespace scwx namespace scwx::provider
{
namespace provider
{ {
/** /**
@ -30,5 +28,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace provider } // namespace scwx::provider
} // namespace scwx

View file

@ -29,9 +29,7 @@
# pragma warning(pop) # pragma warning(pop)
#endif #endif
namespace scwx namespace scwx::provider
{
namespace provider
{ {
static const std::string logPrefix_ = "scwx::provider::warnings_provider"; static const std::string logPrefix_ = "scwx::provider::warnings_provider";
@ -42,9 +40,9 @@ class WarningsProvider::Impl
public: public:
struct FileInfoRecord struct FileInfoRecord
{ {
FileInfoRecord(const std::string& contentLength, FileInfoRecord(std::string contentLength, std::string lastModified) :
const std::string& lastModified) : contentLengthStr_ {std::move(contentLength)},
contentLengthStr_ {contentLength}, lastModifiedStr_ {lastModified} lastModifiedStr_ {std::move(lastModified)}
{ {
} }
@ -54,12 +52,16 @@ public:
using WarningFileMap = std::map<std::string, FileInfoRecord>; using WarningFileMap = std::map<std::string, FileInfoRecord>;
explicit Impl(const std::string& baseUrl) : explicit Impl(std::string baseUrl) :
baseUrl_ {baseUrl}, files_ {}, filesMutex_ {} baseUrl_ {std::move(baseUrl)}, files_ {}, filesMutex_ {}
{ {
} }
~Impl() {} ~Impl() = default;
Impl(const Impl&) = delete;
Impl& operator=(const Impl&) = delete;
Impl(const Impl&&) = delete;
Impl& operator=(const Impl&&) = delete;
bool UpdateFileRecord(const cpr::Response& response, bool UpdateFileRecord(const cpr::Response& response,
const std::string& filename); const std::string& filename);
@ -87,7 +89,6 @@ WarningsProvider::LoadUpdatedFiles(
using namespace std::chrono; using namespace std::chrono;
#if (__cpp_lib_chrono >= 201907L) #if (__cpp_lib_chrono >= 201907L)
namespace date = std::chrono;
namespace df = std; namespace df = std;
#else #else
using namespace date; using namespace date;
@ -251,5 +252,4 @@ bool WarningsProvider::Impl::UpdateFileRecord(const cpr::Response& response,
return updated; return updated;
} }
} // namespace provider } // namespace scwx::provider
} // namespace scwx