mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-07-09 20:51:51 +00:00
chore: use std array for json constants
This commit is contained in:
@ -218,7 +218,7 @@ namespace GAME
|
|||||||
std::optional<std::string> name;
|
std::optional<std::string> name;
|
||||||
std::optional<std::string> nameFragment;
|
std::optional<std::string> nameFragment;
|
||||||
std::optional<unsigned> nameHash;
|
std::optional<unsigned> nameHash;
|
||||||
std::vector<float> literal;
|
std::array<float, 4> literal;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void to_json(nlohmann::json& out, const JsonConstant& in)
|
inline void to_json(nlohmann::json& out, const JsonConstant& in)
|
||||||
|
@ -201,12 +201,12 @@ namespace
|
|||||||
jConstantDef.nameFragment = nameFragment;
|
jConstantDef.nameFragment = nameFragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
jConstantDef.literal = std::vector({
|
jConstantDef.literal = {
|
||||||
constantDef.literal.x,
|
constantDef.literal.x,
|
||||||
constantDef.literal.y,
|
constantDef.literal.y,
|
||||||
constantDef.literal.z,
|
constantDef.literal.z,
|
||||||
constantDef.literal.w,
|
constantDef.literal.w,
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CreateJsonStencil(JsonStencil& jStencil, const unsigned pass, const unsigned fail, const unsigned zFail, const unsigned func)
|
static void CreateJsonStencil(JsonStencil& jStencil, const unsigned pass, const unsigned fail, const unsigned zFail, const unsigned func)
|
||||||
|
Reference in New Issue
Block a user