1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 11:22:45 +01:00

Make sprite_names constexpr

This commit is contained in:
Filip Gawin 2018-12-28 17:02:58 +01:00
parent fe3cb2d70c
commit 3fec94247b

View File

@ -4,7 +4,8 @@
#include "script/SCMFile.hpp"
#include "script/ScriptFunctions.hpp"
static const char* sprite_names[] = {
namespace {
constexpr char const* sprite_names[] = {
"", // 0
"radar_asuka",
"radar_bomb",
@ -27,6 +28,7 @@ static const char* sprite_names[] = {
"radar_tony",
"radar_weapon",
};
} // namespace
const char* script::getBlipSprite(ScriptRadarSprite sprite) {
return sprite_names[sprite];