From b9c18e16c10cd1e7cf2cc5c3195d23044e74747d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 2 Jan 2024 13:25:06 +0000 Subject: Remove virtual and wordy traits use --- gentoobrowse-api/domain/converters.impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gentoobrowse-api/domain/converters.impl.h b/gentoobrowse-api/domain/converters.impl.h index 97cc4b0..10afa79 100644 --- a/gentoobrowse-api/domain/converters.impl.h +++ b/gentoobrowse-api/domain/converters.impl.h @@ -9,10 +9,10 @@ namespace Slicer { public: UnpackPqTextArrayInto(std::istream & s, std::vector & l) : UnpackPqTextArray(s), list(l) { } - virtual void + void consume(const std::string & s) override { - if constexpr (std::is_arithmetic::value) { + if constexpr (std::is_arithmetic_v) { if (std::from_chars(s.c_str(), s.c_str() + s.length(), list.emplace_back()).ec != std::error_code {}) { throw std::domain_error {"Invalid arithmetic input"}; } @@ -30,7 +30,7 @@ namespace Slicer { void packPqVar(std::ostream & s, const T & l) { - if constexpr (std::is_arithmetic::value) { + if constexpr (std::is_arithmetic_v) { s << l; } else { -- cgit v1.2.3