Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Color{
- int red;
- int green;
- int blue;
- Color(int hex)
- : ...{
- }
- Color(const std::string& s)
- : ... {
- }
- Color(int r, int g, int b)
- : ... {
- }
- //good default Color anyone?
- // Color() {}
- };
- void foo(){
- Color color;
- if ( config.has("color") ){
- color = Color(config.get("color"));
- }else{
- color = Color(theme.get_default_color());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement