mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-06 13:13:28 +00:00
STRG: Convert file-scope std::vector to std::array
Eliminates a runtime-static constructor and heap allocation at program start.
This commit is contained in:
parent
16c37abf79
commit
96fa7af8b5
@ -1,10 +1,14 @@
|
|||||||
#include "STRG.hpp"
|
#include "STRG.hpp"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
#include "DNAMP1.hpp"
|
#include "DNAMP1.hpp"
|
||||||
|
|
||||||
namespace DataSpec::DNAMP1 {
|
namespace DataSpec::DNAMP1 {
|
||||||
|
|
||||||
const std::vector<FourCC> skLanguages = {FOURCC('ENGL'), FOURCC('FREN'), FOURCC('GERM'), FOURCC('SPAN'),
|
constexpr std::array skLanguages{
|
||||||
FOURCC('ITAL'), FOURCC('DUTC'), FOURCC('JAPN')};
|
FOURCC('ENGL'), FOURCC('FREN'), FOURCC('GERM'), FOURCC('SPAN'), FOURCC('ITAL'), FOURCC('DUTC'), FOURCC('JAPN'),
|
||||||
|
};
|
||||||
|
|
||||||
static uint32_t ParseTag(const char16_t* str) {
|
static uint32_t ParseTag(const char16_t* str) {
|
||||||
char parseStr[9];
|
char parseStr[9];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user