Skip to content

Instantly share code, notes, and snippets.

@nilium

nilium/cvget.cc Secret

Created April 2, 2013 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilium/b1b9da0c387a08c77f39 to your computer and use it in GitHub Desktop.
Save nilium/b1b9da0c387a08c77f39 to your computer and use it in GitHub Desktop.
int console_t::get_int(const string &name, int default_value) {
int result = default_value;
cvar_query.bind_text_static(PLACEHOLDER_NAME, name);
cvar_query.execute([&result](dbresult_t &q) {
result = q.column_int(COLUMN_VALUE);
});
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment