Skip to content

Commit

Permalink
remove unnecessary include
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jun 19, 2014
1 parent 184ea58 commit c4c69d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/gui/widgets/helper.cpp
Expand Up @@ -68,15 +68,15 @@ unsigned decode_font_style(const std::string& style)
return TTF_STYLE_NORMAL;
}

Uint32 decode_color(const std::string& color)
boost::uint32_t decode_color(const std::string& color)
{
std::vector<std::string> fields = utils::split(color);

// make sure we have four fields
while(fields.size() < 4)
fields.push_back("0");

Uint32 result = 0;
boost::uint32_t result = 0;
for(int i = 0; i < 4; ++i) {
// shift the previous value before adding, since it's a nop on the
// first run there's no need for an if.
Expand Down
14 changes: 11 additions & 3 deletions src/gui/widgets/helper.hpp
Expand Up @@ -17,15 +17,23 @@

#include "global.hpp"

#include "SDL.h"

#include <pango/pango-layout.h>

#include <boost/cstdint.hpp>
#include <boost/type_traits.hpp>
#include <boost/utility/enable_if.hpp>

#include <string>

#if defined(_MSC_VER) && _MSC_VER <= 1600
/*
This is needed because msvc up to 2010 fails to correcty forward declare this struct as a return value this case.
And will create corrupt binaries without giving a warning / error.
*/
#include <SDL_video.h>
#else
struct SDL_Rect;
#endif
struct surface;
class t_string;

Expand Down Expand Up @@ -66,7 +74,7 @@ SDL_Rect create_rect(const tpoint& origin, const tpoint& size);
*
* @returns The color.
*/
Uint32 decode_color(const std::string& color);
boost::uint32_t decode_color(const std::string& color);

/**
* Converts a text alignment string to a text alignment.
Expand Down

0 comments on commit c4c69d6

Please sign in to comment.