File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,16 @@ std::string ColorCell::to_str() const{
3939std::string ColorCell::color_to_str (uint32_t color, bool has_alpha){
4040 static const char HEX_DIGITS[] = " 0123456789ABCDEF" ;
4141 std::string str;
42- size_t c = 0 ;
4342 if (has_alpha){
44- str[c++] += HEX_DIGITS[(color >> 28 ) & 0xf ];
45- str[c++] += HEX_DIGITS[(color >> 24 ) & 0xf ];
43+ str += HEX_DIGITS[(color >> 28 ) & 0xf ];
44+ str += HEX_DIGITS[(color >> 24 ) & 0xf ];
4645 }
47- str[c++] += HEX_DIGITS[(color >> 20 ) & 0xf ];
48- str[c++] += HEX_DIGITS[(color >> 16 ) & 0xf ];
49- str[c++] += HEX_DIGITS[(color >> 12 ) & 0xf ];
50- str[c++] += HEX_DIGITS[(color >> 8 ) & 0xf ];
51- str[c++] += HEX_DIGITS[(color >> 4 ) & 0xf ];
52- str[c++] += HEX_DIGITS[(color >> 0 ) & 0xf ];
46+ str += HEX_DIGITS[(color >> 20 ) & 0xf ];
47+ str += HEX_DIGITS[(color >> 16 ) & 0xf ];
48+ str += HEX_DIGITS[(color >> 12 ) & 0xf ];
49+ str += HEX_DIGITS[(color >> 8 ) & 0xf ];
50+ str += HEX_DIGITS[(color >> 4 ) & 0xf ];
51+ str += HEX_DIGITS[(color >> 0 ) & 0xf ];
5352 return str;
5453}
5554ColorCell::operator uint32_t () const {
You can’t perform that action at this time.
0 commit comments