refactor(Core/Common): restyle common lib with astyle (#3461)

This commit is contained in:
Kargatum
2020-09-12 03:50:48 +07:00
committed by GitHub
parent e15a493927
commit 3a0b0356ac
101 changed files with 4524 additions and 4418 deletions

View File

@@ -17,18 +17,18 @@
namespace ByteConverter
{
template<size_t T>
inline void convert(char *val)
inline void convert(char* val)
{
std::swap(*val, *(val + T - 1));
convert<T - 2>(val + 1);
convert < T - 2 > (val + 1);
}
template<> inline void convert<0>(char *) { }
template<> inline void convert<1>(char *) { } // ignore central byte
template<> inline void convert<0>(char*) { }
template<> inline void convert<1>(char*) { } // ignore central byte
template<typename T> inline void apply(T *val)
template<typename T> inline void apply(T* val)
{
convert<sizeof(T)>((char *)(val));
convert<sizeof(T)>((char*)(val));
}
}