mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 19:47:43 +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:
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user