Skip to content
Permalink
Browse files

Use std::array for bootstrap code

  • Loading branch information...
TheCycoONE committed Apr 22, 2019
1 parent 8949a05 commit 2f27a02939982ef58a00700b7863de5f4d9f9d2a
Showing with 2 additions and 2 deletions.
  1. +2 −2 CorsixTH/Src/bootstrap.cpp
@@ -43,7 +43,7 @@ homemade bitmap font, as we cannot rely on TH fonts being present).
namespace {

constexpr int first_bootstrap_code_line_number = __LINE__ + 2;
constexpr const char* bootstrap_code[] = {
constexpr std::array<const char*, 45> bootstrap_code {{
"local lines, dat, tab, pal, err = {}, ...",
"local function t(s) return s:gsub('\\t', ' ') end",
"for s in tostring(err):gmatch'[^\\r\\n]+' do lines[#lines+1] = t(s) end",
@@ -89,7 +89,7 @@ constexpr const char* bootstrap_code[] = {
" if running then print(e) end",
"until where ~= 'callback'",
nullptr
};
}};

/* Start autogenerated content */
/* Data from bootstrap_font.tab inserted by mkbootstrap.lua: */

0 comments on commit 2f27a02

Please sign in to comment.
You can’t perform that action at this time.