1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 17:15:21 +02: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
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);
}