Files
GDevelop/Core/GDCore/Tools/HexToRgb.h
Florian Rival a8559bfbbc Add clang-format to format (C++) source files automatically (#491)
* Update all CMakeLists of extensions to use clang-format
* Run clang-format on all Extensions
* Update GDCore CMakeLists.txt to add clang-format
* Run clang-format on GDCore files
* Update GDJS and GDCpp CMakeLists.txt to add clang-format
* Run clang-format on GDCpp and GDJS files
2018-05-09 15:57:38 -07:00

12 lines
236 B
C++

namespace gd {
template <typename T>
T& HexToRgb(int hexValue, T& output) {
output["r"] = ((hexValue >> 16) & 0xFF);
output["g"] = ((hexValue >> 8) & 0xFF);
output["b"] = ((hexValue)&0xFF);
return output;
}
} // namespace gd