Skip to content

Instantly share code, notes, and snippets.

@ice1000
Created May 15, 2018 05:44
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 ice1000/93308d7aad61832a72296fa91b151c7f to your computer and use it in GitHub Desktop.
Save ice1000/93308d7aad61832a72296fa91b151c7f to your computer and use it in GitHub Desktop.
struct Config { blabla };
typedef int ConfigType;
enum ConfigType_ { Type1, Type2, Type3, TypeCOUNT; };
auto SetConfig(ConfigType type, Config config) -> void {
switch (type) {
case Type1: blablba; break;
case Type2: blablba; break;
case Type3: blablba; break;
default: error(); break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment