Misc renaming of types to drop t- prefix
This commit is contained in:
parent
b74afeff73
commit
5392e306b9
8 changed files with 37 additions and 39 deletions
|
@ -1160,7 +1160,7 @@ void display::drawing_buffer_add(const drawing_layer layer,
|
|||
const map_location& loc, int x, int y, const surface& surf,
|
||||
const SDL_Rect &clip)
|
||||
{
|
||||
drawing_buffer_.push_back(tblit(layer, loc, x, y, surf, clip));
|
||||
drawing_buffer_.push_back(blit_helper(layer, loc, x, y, surf, clip));
|
||||
}
|
||||
|
||||
void display::drawing_buffer_add(const drawing_layer layer,
|
||||
|
@ -1168,7 +1168,7 @@ void display::drawing_buffer_add(const drawing_layer layer,
|
|||
const std::vector<surface> &surf,
|
||||
const SDL_Rect &clip)
|
||||
{
|
||||
drawing_buffer_.push_back(tblit(layer, loc, x, y, surf, clip));
|
||||
drawing_buffer_.push_back(blit_helper(layer, loc, x, y, surf, clip));
|
||||
}
|
||||
|
||||
// FIXME: temporary method. Group splitting should be made
|
||||
|
@ -1257,10 +1257,10 @@ void display::drawing_buffer_commit()
|
|||
* avoid decapitation a unit.
|
||||
*
|
||||
* This ended in the following priority order:
|
||||
* layergroup > location > layer > 'tblit' > surface
|
||||
* layergroup > location > layer > 'blit_helper' > surface
|
||||
*/
|
||||
|
||||
for (const tblit &blit : drawing_buffer_) {
|
||||
for (const blit_helper &blit : drawing_buffer_) {
|
||||
for (const surface& surf : blit.surf()) {
|
||||
// Note that dstrect can be changed by sdl_blit
|
||||
// and so a new instance should be initialized
|
||||
|
|
|
@ -945,17 +945,17 @@ protected:
|
|||
};
|
||||
|
||||
/** Helper structure for rendering the terrains. */
|
||||
class tblit
|
||||
class blit_helper
|
||||
{
|
||||
public:
|
||||
tblit(const drawing_layer layer, const map_location& loc,
|
||||
blit_helper(const drawing_layer layer, const map_location& loc,
|
||||
const int x, const int y, const surface& surf,
|
||||
const SDL_Rect& clip)
|
||||
: x_(x), y_(y), surf_(1, surf), clip_(clip),
|
||||
key_(loc, layer)
|
||||
{}
|
||||
|
||||
tblit(const drawing_layer layer, const map_location& loc,
|
||||
blit_helper(const drawing_layer layer, const map_location& loc,
|
||||
const int x, const int y, const std::vector<surface>& surf,
|
||||
const SDL_Rect& clip)
|
||||
: x_(x), y_(y), surf_(surf), clip_(clip),
|
||||
|
@ -967,7 +967,7 @@ protected:
|
|||
const std::vector<surface> &surf() const { return surf_; }
|
||||
const SDL_Rect &clip() const { return clip_; }
|
||||
|
||||
bool operator<(const tblit &rhs) const { return key_ < rhs.key_; }
|
||||
bool operator<(const blit_helper &rhs) const { return key_ < rhs.key_; }
|
||||
|
||||
private:
|
||||
int x_; /**< x screen coordinate to render at. */
|
||||
|
@ -980,8 +980,8 @@ protected:
|
|||
drawing_buffer_key key_;
|
||||
};
|
||||
|
||||
typedef std::list<tblit> tdrawing_buffer;
|
||||
tdrawing_buffer drawing_buffer_;
|
||||
typedef std::list<blit_helper> drawing_buffer;
|
||||
drawing_buffer drawing_buffer_;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
|
|
@ -59,9 +59,7 @@ struct ttf_record
|
|||
int style;
|
||||
};
|
||||
|
||||
typedef std::map<font_id, ttf_record> tfont_table;
|
||||
|
||||
static tfont_table font_table;
|
||||
static std::map<font_id, ttf_record> font_table;
|
||||
static std::vector<std::string> font_names;
|
||||
static std::vector<std::string> bold_names;
|
||||
static std::vector<std::string> italic_names;
|
||||
|
@ -139,8 +137,8 @@ typedef std::map<std::string,SDL_Rect> line_size_cache_map;
|
|||
//map of styles -> sizes -> cache
|
||||
static std::map<int,std::map<int,line_size_cache_map> > line_size_cache;
|
||||
|
||||
typedef std::map<std::pair<std::string, int>, TTF_Font*> topen_font_cache;
|
||||
topen_font_cache open_fonts;
|
||||
typedef std::map<std::pair<std::string, int>, TTF_Font*> open_font_cache;
|
||||
open_font_cache open_fonts;
|
||||
|
||||
static TTF_Font* open_font_impl(const std::string & , int);
|
||||
|
||||
|
@ -150,7 +148,7 @@ static TTF_Font* open_font_impl(const std::string & , int);
|
|||
static TTF_Font* open_font(const std::string& fname, int size)
|
||||
{
|
||||
const std::pair<std::string, int> key = std::make_pair(fname, size);
|
||||
const topen_font_cache::iterator it = open_fonts.find(key);
|
||||
const open_font_cache::iterator it = open_fonts.find(key);
|
||||
if (it != open_fonts.end()) {
|
||||
return it->second;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace implementation {
|
|||
, typename ToEnable = void
|
||||
, typename FromEnable = void
|
||||
>
|
||||
struct tlexical_cast;
|
||||
struct lexical_cast;
|
||||
|
||||
} // namespace implementation
|
||||
|
||||
|
@ -91,7 +91,7 @@ namespace implementation {
|
|||
template<typename To, typename From>
|
||||
inline To lexical_cast(From value)
|
||||
{
|
||||
return implementation::tlexical_cast<To, From>().operator()(value);
|
||||
return implementation::lexical_cast<To, From>().operator()(value);
|
||||
}
|
||||
|
||||
/** Thrown when a lexical_cast fails. */
|
||||
|
@ -116,7 +116,7 @@ template<
|
|||
, typename ToEnable
|
||||
, typename FromEnable
|
||||
>
|
||||
struct tlexical_cast
|
||||
struct lexical_cast
|
||||
{
|
||||
To operator()(From value)
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ struct tlexical_cast
|
|||
* integral type.
|
||||
*/
|
||||
template <typename From>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
std::string
|
||||
, From
|
||||
, void
|
||||
|
@ -166,7 +166,7 @@ struct tlexical_cast<
|
|||
* performance penalty at 32 bit systems.
|
||||
*/
|
||||
template <class From>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
long long
|
||||
, From
|
||||
, void
|
||||
|
@ -197,7 +197,7 @@ struct tlexical_cast<
|
|||
* performance penalty at 32 bit systems.
|
||||
*/
|
||||
template <>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
long long
|
||||
, std::string
|
||||
>
|
||||
|
@ -216,7 +216,7 @@ struct tlexical_cast<
|
|||
* Specialized for returning a signed type from a (const) char*.
|
||||
*/
|
||||
template <class To, class From>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
To
|
||||
, From
|
||||
, typename std::enable_if<std::is_signed<To>::value >::type
|
||||
|
@ -245,7 +245,7 @@ struct tlexical_cast<
|
|||
* Specialized for returning a signed type from a std::string.
|
||||
*/
|
||||
template <class To>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
To
|
||||
, std::string
|
||||
, typename std::enable_if<std::is_signed<To>::value >::type
|
||||
|
@ -267,7 +267,7 @@ struct tlexical_cast<
|
|||
* has a performance penalty at 32 bit systems.
|
||||
*/
|
||||
template <class From>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
unsigned long long
|
||||
, From
|
||||
, void
|
||||
|
@ -299,7 +299,7 @@ struct tlexical_cast<
|
|||
* has a performance penalty at 32 bit systems.
|
||||
*/
|
||||
template <>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
unsigned long long
|
||||
, std::string
|
||||
>
|
||||
|
@ -318,7 +318,7 @@ struct tlexical_cast<
|
|||
* Specialized for returning a unsigned type from a (const) char*.
|
||||
*/
|
||||
template <class To, class From>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
To
|
||||
, From
|
||||
, typename std::enable_if<std::is_unsigned<To>::value >::type
|
||||
|
@ -347,7 +347,7 @@ struct tlexical_cast<
|
|||
* Specialized for returning a unsigned type from a std::string.
|
||||
*/
|
||||
template <class To>
|
||||
struct tlexical_cast<
|
||||
struct lexical_cast<
|
||||
To
|
||||
, std::string
|
||||
, typename std::enable_if<std::is_unsigned<To>::value >::type
|
||||
|
|
|
@ -58,13 +58,13 @@ static std::ostream& output()
|
|||
|
||||
namespace lg {
|
||||
|
||||
tredirect_output_setter::tredirect_output_setter(std::ostream& stream)
|
||||
redirect_output_setter::redirect_output_setter(std::ostream& stream)
|
||||
: old_stream_(output_stream)
|
||||
{
|
||||
output_stream = &stream;
|
||||
}
|
||||
|
||||
tredirect_output_setter::~tredirect_output_setter()
|
||||
redirect_output_setter::~redirect_output_setter()
|
||||
{
|
||||
output_stream = old_stream_;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace lg {
|
|||
* The main usage of the redirection is for the unit tests to validate the
|
||||
* output on the logger with the expected output.
|
||||
*/
|
||||
class tredirect_output_setter
|
||||
class redirect_output_setter
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -77,9 +77,9 @@ public:
|
|||
*
|
||||
* @param stream The stream to direct the output to.
|
||||
*/
|
||||
explicit tredirect_output_setter(std::ostream& stream);
|
||||
explicit redirect_output_setter(std::ostream& stream);
|
||||
|
||||
~tredirect_output_setter();
|
||||
~redirect_output_setter();
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ static void test_grid()
|
|||
|
||||
{
|
||||
std::stringstream sstr;
|
||||
lg::tredirect_output_setter redirect_output(sstr);
|
||||
lg::redirect_output_setter redirect_output(sstr);
|
||||
|
||||
gui2::iterator::titerator<gui2::iterator::policy::order::ttop_down<
|
||||
true
|
||||
|
@ -212,7 +212,7 @@ static void test_grid()
|
|||
}
|
||||
{
|
||||
std::stringstream sstr;
|
||||
lg::tredirect_output_setter redirect_output(sstr);
|
||||
lg::redirect_output_setter redirect_output(sstr);
|
||||
|
||||
gui2::iterator::titerator<gui2::iterator::policy::order::ttop_down<
|
||||
true
|
||||
|
@ -228,7 +228,7 @@ static void test_grid()
|
|||
}
|
||||
{
|
||||
std::stringstream sstr;
|
||||
lg::tredirect_output_setter redirect_output(sstr);
|
||||
lg::redirect_output_setter redirect_output(sstr);
|
||||
|
||||
gui2::iterator::titerator<gui2::iterator::policy::order::tbottom_up<
|
||||
true
|
||||
|
@ -244,7 +244,7 @@ static void test_grid()
|
|||
}
|
||||
{
|
||||
std::stringstream sstr;
|
||||
lg::tredirect_output_setter redirect_output(sstr);
|
||||
lg::redirect_output_setter redirect_output(sstr);
|
||||
|
||||
gui2::iterator::titerator<gui2::iterator::policy::order::tbottom_up<
|
||||
true
|
||||
|
@ -273,7 +273,7 @@ BOOST_AUTO_TEST_CASE(test_gui2_iterator)
|
|||
lg::timestamps(false);
|
||||
|
||||
std::stringstream sstr;
|
||||
lg::tredirect_output_setter redirect_output(sstr);
|
||||
lg::redirect_output_setter redirect_output(sstr);
|
||||
|
||||
test_control();
|
||||
test_grid();
|
||||
|
|
|
@ -116,7 +116,7 @@ private:
|
|||
}
|
||||
|
||||
std::stringstream ignored_stream_;
|
||||
lg::tredirect_output_setter output_redirect_;
|
||||
lg::redirect_output_setter output_redirect_;
|
||||
filesystem::binary_paths_manager paths_manager_;
|
||||
};
|
||||
} // anonymous namespace
|
||||
|
|
Loading…
Add table
Reference in a new issue