mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Refactor superpatrons/patrons/githubfriends to not push_back(string)
It's a bit bad for the compiler if you have lots of function calls with hardcoded strings in them, because every time the compiler encounters one, it has to go out of its way to find a dedicated storage location for the string, which is really inefficient. And it does this inefficient thing every single time. There's not much of an impact compiling these lists, but I at least want to encourage this sort of code style, instead of the push_back(string) style, in case we ever need a hardcoded array of things later.
This commit is contained in:
parent
b5a009f2e2
commit
6913abb171
1 changed files with 102 additions and 92 deletions
|
@ -380,100 +380,110 @@ void Game::init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Terry's Patrons... */
|
/* Terry's Patrons... */
|
||||||
superpatrons.push_back("Anders Ekermo");
|
const char* superpatrons_arr[] = {
|
||||||
superpatrons.push_back("Andreas K|mper");
|
"Anders Ekermo",
|
||||||
superpatrons.push_back("Anthony Burch");
|
"Andreas K|mper",
|
||||||
superpatrons.push_back("Bennett Foddy");
|
"Anthony Burch",
|
||||||
superpatrons.push_back("Brendan O'Sullivan");
|
"Bennett Foddy",
|
||||||
superpatrons.push_back("Christopher Armstrong");
|
"Brendan O'Sullivan",
|
||||||
superpatrons.push_back("Daniel Benmergui");
|
"Christopher Armstrong",
|
||||||
superpatrons.push_back("David Pittman");
|
"Daniel Benmergui",
|
||||||
superpatrons.push_back("Ian Bogost");
|
"David Pittman",
|
||||||
superpatrons.push_back("Ian Poma");
|
"Ian Bogost",
|
||||||
superpatrons.push_back("Jaz McDougall");
|
"Ian Poma",
|
||||||
superpatrons.push_back("John Faulkenbury");
|
"Jaz McDougall",
|
||||||
superpatrons.push_back("Jonathan Whiting");
|
"John Faulkenbury",
|
||||||
superpatrons.push_back("Kyle Pulver");
|
"Jonathan Whiting",
|
||||||
superpatrons.push_back("Markus Persson");
|
"Kyle Pulver",
|
||||||
superpatrons.push_back("Nathan Ostgard");
|
"Markus Persson",
|
||||||
superpatrons.push_back("Nick Easler");
|
"Nathan Ostgard",
|
||||||
superpatrons.push_back("Stephen Lavelle");
|
"Nick Easler",
|
||||||
patrons.push_back("Adam Wendt");
|
"Stephen Lavelle",
|
||||||
patrons.push_back("Andreas J{rgensen");
|
};
|
||||||
patrons.push_back("}ngel Louzao Penalva");
|
superpatrons.insert(superpatrons.end(), superpatrons_arr, superpatrons_arr + sizeof(superpatrons_arr)/sizeof(superpatrons_arr[0]));
|
||||||
patrons.push_back("Ashley Burton");
|
|
||||||
patrons.push_back("Aubrey Hesselgren");
|
const char* patrons_arr[] = {
|
||||||
patrons.push_back("Bradley Rose");
|
"Adam Wendt",
|
||||||
patrons.push_back("Brendan Urquhart");
|
"Andreas J{rgensen",
|
||||||
patrons.push_back("Chris Ayotte");
|
"}ngel Louzao Penalva",
|
||||||
patrons.push_back("Christopher Zamanillo");
|
"Ashley Burton",
|
||||||
patrons.push_back("Daniel Schuller");
|
"Aubrey Hesselgren",
|
||||||
patrons.push_back("Hybrid Mind Studios");
|
"Bradley Rose",
|
||||||
patrons.push_back("Emilie McGinley");
|
"Brendan Urquhart",
|
||||||
patrons.push_back("Francisco Solares");
|
"Chris Ayotte",
|
||||||
patrons.push_back("Hal Helms");
|
"Christopher Zamanillo",
|
||||||
patrons.push_back("Hayden Scott-Baron");
|
"Daniel Schuller",
|
||||||
patrons.push_back("Hermit Games");
|
"Hybrid Mind Studios",
|
||||||
patrons.push_back("Ido Yehieli");
|
"Emilie McGinley",
|
||||||
patrons.push_back("Jade Vault Games");
|
"Francisco Solares",
|
||||||
patrons.push_back("James Andrews");
|
"Hal Helms",
|
||||||
patrons.push_back("James Riley");
|
"Hayden Scott-Baron",
|
||||||
patrons.push_back("James Hsieh");
|
"Hermit Games",
|
||||||
patrons.push_back("Jasper Byrne");
|
"Ido Yehieli",
|
||||||
patrons.push_back("Jedediah Baker");
|
"Jade Vault Games",
|
||||||
patrons.push_back("Jens Bergensten");
|
"James Andrews",
|
||||||
patrons.push_back("Jeremy J. Penner");
|
"James Riley",
|
||||||
patrons.push_back("Jeremy Peterson");
|
"James Hsieh",
|
||||||
patrons.push_back("Jim McGinley");
|
"Jasper Byrne",
|
||||||
patrons.push_back("Jonathan Cartwright");
|
"Jedediah Baker",
|
||||||
patrons.push_back("John Nesky");
|
"Jens Bergensten",
|
||||||
patrons.push_back("Jos Yule");
|
"Jeremy J. Penner",
|
||||||
patrons.push_back("Jose Flores");
|
"Jeremy Peterson",
|
||||||
patrons.push_back("Josh Bizeau");
|
"Jim McGinley",
|
||||||
patrons.push_back("Joshua Buergel");
|
"Jonathan Cartwright",
|
||||||
patrons.push_back("Joshua Hochner");
|
"John Nesky",
|
||||||
patrons.push_back("Kurt Ostfeld");
|
"Jos Yule",
|
||||||
patrons.push_back("Magnus P~lsson");
|
"Jose Flores",
|
||||||
patrons.push_back("Mark Neschadimenko");
|
"Josh Bizeau",
|
||||||
patrons.push_back("Matt Antonellis");
|
"Joshua Buergel",
|
||||||
patrons.push_back("Matthew Reppert");
|
"Joshua Hochner",
|
||||||
patrons.push_back("Michael Falkensteiner");
|
"Kurt Ostfeld",
|
||||||
patrons.push_back("Michael Vendittelli");
|
"Magnus P~lsson",
|
||||||
patrons.push_back("Mike Kasprzak");
|
"Mark Neschadimenko",
|
||||||
patrons.push_back("Mitchel Stein");
|
"Matt Antonellis",
|
||||||
patrons.push_back("Sean Murray");
|
"Matthew Reppert",
|
||||||
patrons.push_back("Simon Michael");
|
"Michael Falkensteiner",
|
||||||
patrons.push_back("Simon Schmid");
|
"Michael Vendittelli",
|
||||||
patrons.push_back("Stephen Maxwell");
|
"Mike Kasprzak",
|
||||||
patrons.push_back("Swing Swing Submarine");
|
"Mitchel Stein",
|
||||||
patrons.push_back("Tam Toucan");
|
"Sean Murray",
|
||||||
patrons.push_back("Terry Dooher");
|
"Simon Michael",
|
||||||
patrons.push_back("Tim W.");
|
"Simon Schmid",
|
||||||
patrons.push_back("Timothy Bragan");
|
"Stephen Maxwell",
|
||||||
|
"Swing Swing Submarine",
|
||||||
|
"Tam Toucan",
|
||||||
|
"Terry Dooher",
|
||||||
|
"Tim W.",
|
||||||
|
"Timothy Bragan",
|
||||||
|
};
|
||||||
|
patrons.insert(patrons.end(), patrons_arr, patrons_arr + sizeof(patrons_arr)/sizeof(patrons_arr[0]));
|
||||||
|
|
||||||
/* CONTRIBUTORS.txt, again listed alphabetically (according to `sort`) by last name */
|
/* CONTRIBUTORS.txt, again listed alphabetically (according to `sort`) by last name */
|
||||||
githubfriends.push_back("Matt \"Stelpjo\" Aaldenberg");
|
const char* githubfriends_arr[] = {
|
||||||
githubfriends.push_back("AlexApps99");
|
"Matt \"Stelpjo\" Aaldenberg",
|
||||||
githubfriends.push_back("Christoph B{hmwalder");
|
"AlexApps99",
|
||||||
githubfriends.push_back("Charlie Bruce");
|
"Christoph B{hmwalder",
|
||||||
githubfriends.push_back("Brian Callahan");
|
"Charlie Bruce",
|
||||||
githubfriends.push_back("Dav999");
|
"Brian Callahan",
|
||||||
githubfriends.push_back("Allison Fleischer");
|
"Dav999",
|
||||||
githubfriends.push_back("Daniel Lee");
|
"Allison Fleischer",
|
||||||
githubfriends.push_back("Fredrik Ljungdahl");
|
"Daniel Lee",
|
||||||
githubfriends.push_back("Matt Penny");
|
"Fredrik Ljungdahl",
|
||||||
githubfriends.push_back("Elliott Saltar");
|
"Matt Penny",
|
||||||
githubfriends.push_back("Marvin Scholz");
|
"Elliott Saltar",
|
||||||
githubfriends.push_back("Keith Stellyes");
|
"Marvin Scholz",
|
||||||
githubfriends.push_back("Elijah Stone");
|
"Keith Stellyes",
|
||||||
githubfriends.push_back("Thomas S|nger");
|
"Elijah Stone",
|
||||||
githubfriends.push_back("Info Teddy");
|
"Thomas S|nger",
|
||||||
githubfriends.push_back("Alexandra Tildea");
|
"Info Teddy",
|
||||||
githubfriends.push_back("leo60228");
|
"Alexandra Tildea",
|
||||||
githubfriends.push_back("Emmanuel Vadot");
|
"leo60228",
|
||||||
githubfriends.push_back("Remi Verschelde"); // TODO: Change to "Rémi" if/when UTF-8 support is added
|
"Emmanuel Vadot",
|
||||||
githubfriends.push_back("viri");
|
"Remi Verschelde", // TODO: Change to "Rémi" if/when UTF-8 support is added
|
||||||
githubfriends.push_back("Wouter");
|
"viri",
|
||||||
|
"Wouter",
|
||||||
|
};
|
||||||
|
githubfriends.insert(githubfriends.end(), githubfriends_arr, githubfriends_arr + sizeof(githubfriends_arr)/sizeof(githubfriends_arr[0]));
|
||||||
|
|
||||||
/* Calculate credits length, finally. */
|
/* Calculate credits length, finally. */
|
||||||
creditmaxposition = 1050 + (10 * (
|
creditmaxposition = 1050 + (10 * (
|
||||||
|
|
Loading…
Reference in a new issue