[tidy] Fix tabs -> spaces
This commit is contained in:
parent
f032657e33
commit
f3a4eefb3a
@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
#include <QtGui/QFont>
|
#include <QtGui/QFont>
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
@ -31,14 +33,14 @@ namespace {
|
|||||||
return (sum2 << std::numeric_limits<uint32_t>::digits) | sum1;
|
return (sum2 << std::numeric_limits<uint32_t>::digits) | sum1;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef std::string ParamHash;
|
typedef std::string ParamHash;
|
||||||
ParamHash fletcher64(const std::string& input)
|
ParamHash fletcher64(const std::string& input)
|
||||||
{
|
{
|
||||||
std::vector<uint32_t> buf((input.size() + sizeof(uint32_t) - 1) / sizeof(uint32_t), 0);
|
std::vector<uint32_t> 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)));
|
std::memcpy((std::string::pointer)buf.data(), input.data(), input.size());
|
||||||
auto resInt = fletcher64(buf.data(), buf.size());
|
auto resInt = ::fletcher64(buf.data(), static_cast<int>(buf.size()));
|
||||||
return intToHex(resInt);
|
return intToHex(resInt);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user