1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Move EnumString to separate file and add enum_to_string (#15714)

This commit is contained in:
cx384 2025-01-26 19:17:14 +01:00 committed by GitHub
parent bee541f378
commit e9826f7819
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 90 additions and 75 deletions

View file

@ -12,7 +12,6 @@
#include "util/serialize.h"
#include "util/numeric.h"
#include "util/hex.h"
#include "common/c_content.h"
#include <json/json.h>
@ -235,7 +234,7 @@ void WearBarParams::serializeJson(std::ostream &os) const
color_stops[ftos(item.first)] = encodeHexColorString(item.second);
}
root["color_stops"] = color_stops;
root["blend"] = WearBarParams::es_BlendMode[blend].str;
root["blend"] = enum_to_string(WearBarParams::es_BlendMode, blend);
fastWriteJson(root, os);
}