mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 15:36:59 +00:00
Silence some pedantic format warnings from Clang.
rogueviz/rogueviz.cpp: In function ‘hr::color_t rogueviz::parse1(const string&)’: rogueviz/rogueviz.cpp:76:75: error: format ‘%x’ expects argument of type ‘unsigned int*’, but argument 3 has type ‘int*’ [-Werror=format=] sscanf(s.c_str(), "R%x,%x,%x,%d,%d", &mh, &minh, &alpha, &step, &start); ^ I believe these three variables should have been `color_t` all along. I think this fix doesn't change any of the arithmetic, but I could be wrong.
This commit is contained in:
parent
364c33b1d8
commit
e59d22e399
@ -72,7 +72,8 @@ color_t parse1(const string& s) {
|
||||
// color can be given as RRGGBB
|
||||
// or as 'Rmax,min,alpha,step,start', for rainbow Collatz
|
||||
if(s[0] == 'R') {
|
||||
int mh = 192, minh = 0, alpha = 255, step = 50, start = 0;
|
||||
color_t mh = 192, minh = 0, alpha = 255;
|
||||
int step = 50, start = 0;
|
||||
sscanf(s.c_str(), "R%x,%x,%x,%d,%d", &mh, &minh, &alpha, &step, &start);
|
||||
vector<color_t> hues;
|
||||
color_t difh = mh - minh;
|
||||
|
Loading…
Reference in New Issue
Block a user