From f3a4eefb3ae90ca9230ecb1e0335c0de3cfd6d4a Mon Sep 17 00:00:00 2001 From: Peter Sykora Date: Mon, 22 Apr 2024 21:28:05 +0200 Subject: [PATCH] [tidy] Fix tabs -> spaces --- CCEngine/src/SystemParamsModel.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CCEngine/src/SystemParamsModel.cpp b/CCEngine/src/SystemParamsModel.cpp index 5ba169f..89ee9cd 100644 --- a/CCEngine/src/SystemParamsModel.cpp +++ b/CCEngine/src/SystemParamsModel.cpp @@ -2,8 +2,10 @@ #include +#include #include #include + namespace { template< typename T > @@ -31,14 +33,14 @@ namespace { return (sum2 << std::numeric_limits::digits) | sum1; } - typedef std::string ParamHash; - ParamHash fletcher64(const std::string& input) - { - std::vector buf((input.size() + sizeof(uint32_t) - 1) / sizeof(uint32_t), 0); - std::copy_n(std::begin(input), input.size(), stdext::make_checked_array_iterator((std::string::pointer)buf.data(), buf.size() * sizeof(uint32_t))); - auto resInt = fletcher64(buf.data(), buf.size()); - return intToHex(resInt); - } + typedef std::string ParamHash; + ParamHash fletcher64(const std::string& input) + { + std::vector buf((input.size() + sizeof(uint32_t) - 1) / sizeof(uint32_t), 0); + std::memcpy((std::string::pointer)buf.data(), input.data(), input.size()); + auto resInt = ::fletcher64(buf.data(), static_cast(buf.size())); + return intToHex(resInt); + } }