Eliminate C-style enum/struct declarations
This commit is contained in:
parent
63081cac46
commit
d58697e777
4 changed files with 6 additions and 6 deletions
|
@ -32,10 +32,10 @@ class plugins_context {
|
|||
|
||||
public:
|
||||
typedef std::function<bool(config)> callback_function;
|
||||
typedef struct { char const * name; callback_function func; } Reg;
|
||||
struct Reg { char const * name; callback_function func; };
|
||||
|
||||
typedef std::function<config(config)> accessor_function;
|
||||
typedef struct { char const * name; accessor_function func; } aReg;
|
||||
struct aReg { char const * name; accessor_function func; };
|
||||
|
||||
plugins_context( const std::string & name );
|
||||
plugins_context( const std::string & name, const std::vector<Reg>& callbacks, const std::vector<aReg>& accessors);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <SDL_video.h>
|
||||
|
||||
typedef struct { size_t x1,y1,x2,y2; } _rect;
|
||||
struct _rect { size_t x1,y1,x2,y2; };
|
||||
|
||||
struct theme_info
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ class unit_animation
|
|||
/** Shouldn't be used so only declared. */
|
||||
unit_animation();
|
||||
public:
|
||||
typedef enum { MATCH_FAIL=-10 , DEFAULT_ANIM=-9} variation_type;
|
||||
enum variation_type { MATCH_FAIL=-10 , DEFAULT_ANIM=-9};
|
||||
MAKE_ENUM(hit_type,
|
||||
(HIT, "hit")
|
||||
(MISS, "miss")
|
||||
|
@ -106,7 +106,7 @@ class unit_animation
|
|||
virtual ~particule();
|
||||
bool need_update() const;
|
||||
bool need_minimal_update() const;
|
||||
typedef enum { UNSET,CYCLE,NO_CYCLE} cycle_state;
|
||||
enum cycle_state { UNSET,CYCLE,NO_CYCLE};
|
||||
void override(int start_time
|
||||
, int duration
|
||||
, const cycle_state cycles
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
typedef progressive_<int> progressive_int;
|
||||
typedef progressive_<double> progressive_double;
|
||||
|
||||
typedef enum tristate {t_false,t_true,t_unset} tristate;
|
||||
enum tristate {t_false,t_true,t_unset};
|
||||
bool tristate_to_bool(tristate tri, bool def);
|
||||
/** All parameters from a frame at a given instant */
|
||||
class frame_parameters{
|
||||
|
|
Loading…
Add table
Reference in a new issue