mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 14:19:51 +00:00
Rename some misc classes to drop t_ prefix
This commit is contained in:
parent
8df0c0023c
commit
22bbe5465b
@ -28,9 +28,9 @@ struct shroud_clearing_action
|
||||
|
||||
}
|
||||
|
||||
typedef std::vector<map_location> t_route;
|
||||
typedef std::vector<map_location> route_t;
|
||||
|
||||
shroud_clearing_action(const unit_const_ptr u, const t_route::const_iterator& begin, const t_route::const_iterator& end, int village_owner, bool village_bonus)
|
||||
shroud_clearing_action(const unit_const_ptr u, const route_t::const_iterator& begin, const route_t::const_iterator& end, int village_owner, bool village_bonus)
|
||||
: route(begin, end)
|
||||
, view_info(*u)
|
||||
, original_village_owner(village_owner)
|
||||
@ -41,7 +41,7 @@ struct shroud_clearing_action
|
||||
|
||||
/// The hexes occupied by the affected unit during this action.
|
||||
/// For recruits and recalls this only contains one hex.
|
||||
t_route route;
|
||||
route_t route;
|
||||
/// A record of the affected unit's ability to see.
|
||||
clearer_info view_info;
|
||||
/// The number of the side that preivously owned the village that the unit stepped on
|
||||
|
@ -55,8 +55,7 @@ public:
|
||||
const std::unique_ptr<actions::undo_list> undo_stack_;
|
||||
int player_number_;
|
||||
|
||||
typedef boost::optional<end_level_data> t_possible_end_level_data;
|
||||
t_possible_end_level_data end_level_data_;
|
||||
boost::optional<end_level_data> end_level_data_;
|
||||
bool init_side_done_;
|
||||
bool start_event_fired_;
|
||||
// used to sync with the mpserver
|
||||
|
@ -265,7 +265,7 @@ public:
|
||||
private:
|
||||
hk_scopes prev_scope_active_;
|
||||
};
|
||||
typedef boost::ptr_vector<hotkey_command> t_hotkey_command_list;
|
||||
typedef boost::ptr_vector<hotkey_command> hotkey_command_list;
|
||||
/// returns a container that contains all currently active hotkey_commands.
|
||||
/// everything that wants a hotkey, must be in this container.
|
||||
const boost::ptr_vector<hotkey_command>& get_hotkey_commands();
|
||||
|
@ -3200,8 +3200,8 @@ int game_lua_kernel::intf_delay(lua_State *L)
|
||||
namespace { // Types
|
||||
|
||||
class recursion_preventer {
|
||||
typedef std::map<map_location, int> t_counter;
|
||||
static t_counter counter_;
|
||||
typedef std::map<map_location, int> counter;
|
||||
static counter counter_;
|
||||
static const int max_recursion = 10;
|
||||
|
||||
map_location loc_;
|
||||
@ -3212,13 +3212,13 @@ namespace { // Types
|
||||
loc_(loc),
|
||||
too_many_recursions_(false)
|
||||
{
|
||||
t_counter::iterator inserted = counter_.insert(std::make_pair(loc_, 0)).first;
|
||||
counter::iterator inserted = counter_.insert(std::make_pair(loc_, 0)).first;
|
||||
++inserted->second;
|
||||
too_many_recursions_ = inserted->second >= max_recursion;
|
||||
}
|
||||
~recursion_preventer()
|
||||
{
|
||||
t_counter::iterator itor = counter_.find(loc_);
|
||||
counter::iterator itor = counter_.find(loc_);
|
||||
if (--itor->second == 0)
|
||||
{
|
||||
counter_.erase(itor);
|
||||
@ -3229,7 +3229,7 @@ namespace { // Types
|
||||
return too_many_recursions_;
|
||||
}
|
||||
};
|
||||
recursion_preventer::t_counter recursion_preventer::counter_;
|
||||
recursion_preventer::counter recursion_preventer::counter_;
|
||||
typedef std::unique_ptr<recursion_preventer> recursion_preventer_ptr;
|
||||
} // end anonymouse namespace (types)
|
||||
|
||||
|
@ -29,20 +29,20 @@ syncmp_handler::~syncmp_handler()
|
||||
std::vector<syncmp_handler*>& syncmp_registry::handlers()
|
||||
{
|
||||
//using pointer in order to prevent destruction at programm end. Although in this simple case it shouldn't matter.
|
||||
static t_handlers* handlers_ = new t_handlers();
|
||||
static handler_list* handlers_ = new handler_list();
|
||||
return *handlers_;
|
||||
}
|
||||
|
||||
void syncmp_registry::remove_handler(syncmp_handler* handler)
|
||||
{
|
||||
t_handlers::iterator elem = std::find(handlers().begin(), handlers().end(), handler);
|
||||
handler_list::iterator elem = std::find(handlers().begin(), handlers().end(), handler);
|
||||
assert(elem != handlers().end());
|
||||
handlers().erase(elem);
|
||||
}
|
||||
|
||||
void syncmp_registry::add_handler(syncmp_handler* handler)
|
||||
{
|
||||
t_handlers::iterator elem = std::find(handlers().begin(), handlers().end(), handler);
|
||||
handler_list::iterator elem = std::find(handlers().begin(), handlers().end(), handler);
|
||||
assert(elem == handlers().end());
|
||||
handlers().push_back(handler);
|
||||
}
|
||||
|
@ -36,10 +36,10 @@ public:
|
||||
static void send_user_choice();
|
||||
private:
|
||||
friend class syncmp_handler;
|
||||
typedef std::vector<syncmp_handler*> t_handlers;
|
||||
typedef std::vector<syncmp_handler*> handler_list;
|
||||
static void remove_handler(syncmp_handler* handler);
|
||||
static void add_handler(syncmp_handler* handler);
|
||||
static t_handlers& handlers();
|
||||
static handler_list& handlers();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -501,7 +501,7 @@ namespace
|
||||
}
|
||||
|
||||
template<const variable_info_type vit>
|
||||
variable_info<vit>::variable_info(const std::string& varname, t_config& vars)
|
||||
variable_info<vit>::variable_info(const std::string& varname, config_var& vars)
|
||||
: name_(varname)
|
||||
, state_(vars)
|
||||
, valid_(true)
|
||||
|
@ -37,9 +37,9 @@ class variable_info
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename variable_info_detail::maybe_const<vit,config>::type t_config;
|
||||
typedef typename variable_info_detail::maybe_const<vit,config>::type config_var;
|
||||
/// Doesn't throw
|
||||
variable_info(const std::string& varname, t_config& vars);
|
||||
variable_info(const std::string& varname, config_var& vars);
|
||||
~variable_info();
|
||||
std::string get_error_message() const;
|
||||
/// Doesn't throw
|
||||
|
@ -67,9 +67,9 @@ namespace variable_info_detail
|
||||
template<const variable_info_type vit>
|
||||
struct variable_info_state
|
||||
{
|
||||
typedef typename maybe_const<vit,config>::type t_child;
|
||||
typedef typename maybe_const<vit,config>::type child_t;
|
||||
|
||||
variable_info_state(t_child& vars)
|
||||
variable_info_state(child_t& vars)
|
||||
: child_(&vars)
|
||||
, key_()
|
||||
, index_(0)
|
||||
@ -81,7 +81,7 @@ namespace variable_info_detail
|
||||
|
||||
// The meaning of the following 3 depends on 'type_', but usualy the case is:
|
||||
// the current config is child_->child_at(key_, index_).
|
||||
t_child* child_;
|
||||
child_t* child_;
|
||||
std::string key_;
|
||||
int index_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user