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:
parent
bee541f378
commit
e9826f7819
22 changed files with 90 additions and 75 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue