Use C++11's in-line member initializers instead of default constructors with initializer lists, for some structs.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-09-18 02:39:18 -03:00
parent fffbd3ecab
commit cf7342f8b7
9 changed files with 33 additions and 97 deletions
-23
View File
@@ -27,29 +27,6 @@ namespace graphics
Texture::Filter Texture::defaultFilter;
Texture::Filter::Filter()
: min(FILTER_LINEAR)
, mag(FILTER_LINEAR)
, mipmap(FILTER_NONE)
, anisotropy(1.0f)
{
}
Texture::Wrap::Wrap()
: s(WRAP_CLAMP)
, t(WRAP_CLAMP)
{
}
Texture::Texture()
: width(0)
, height(0)
, filter(getDefaultFilter())
, wrap()
, vertices()
{
}
Texture::~Texture()
{
}
+6 -8
View File
@@ -57,18 +57,16 @@ public:
struct Filter
{
Filter();
FilterMode min;
FilterMode mag;
FilterMode mipmap;
float anisotropy;
FilterMode min = FILTER_LINEAR;
FilterMode mag = FILTER_LINEAR;
FilterMode mipmap = FILTER_NONE;
float anisotropy = 1.0f;
};
struct Wrap
{
Wrap();
WrapMode s;
WrapMode t;
WrapMode s = WRAP_CLAMP;
WrapMode t = WRAP_CLAMP;
};
Texture();
+2 -4
View File
@@ -60,10 +60,8 @@ public:
struct Flags
{
bool mipmaps;
bool sRGB;
Flags() : mipmaps(false), sRGB(false) {}
bool mipmaps = false;
bool sRGB = false;;
};
/**