mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -38,23 +38,6 @@ void Window::swapBuffers()
|
||||
{
|
||||
}
|
||||
|
||||
WindowSettings::WindowSettings()
|
||||
: fullscreen(false)
|
||||
, fstype(Window::FULLSCREEN_TYPE_EXCLUSIVE)
|
||||
, vsync(true)
|
||||
, msaa(0)
|
||||
, resizable(false)
|
||||
, minwidth(1)
|
||||
, minheight(1)
|
||||
, borderless(false)
|
||||
, centered(true)
|
||||
, display(0)
|
||||
, highdpi(false)
|
||||
, sRGB(false)
|
||||
, refreshrate(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
bool Window::getConstant(const char *in, Window::FullscreenType &out)
|
||||
{
|
||||
return fullscreenTypes.find(in, out);
|
||||
|
||||
+14
-17
@@ -186,23 +186,20 @@ private:
|
||||
|
||||
struct WindowSettings
|
||||
{
|
||||
WindowSettings();
|
||||
|
||||
bool fullscreen; // = false
|
||||
Window::FullscreenType fstype; // = FULLSCREEN_TYPE_EXCLUSIVE
|
||||
bool vsync; // = true
|
||||
int msaa; // = 0
|
||||
bool resizable; // = false
|
||||
int minwidth; // = 1
|
||||
int minheight; // = 1
|
||||
bool borderless; // = false
|
||||
bool centered; // = true
|
||||
int display; // = 0
|
||||
bool highdpi; // false
|
||||
bool sRGB; // false
|
||||
double refreshrate; // 0.0
|
||||
|
||||
}; // WindowSettings
|
||||
bool fullscreen = false;
|
||||
Window::FullscreenType fstype = Window::FULLSCREEN_TYPE_EXCLUSIVE;
|
||||
bool vsync = true;
|
||||
int msaa = 0;
|
||||
bool resizable = false;
|
||||
int minwidth = 1;
|
||||
int minheight = 1;
|
||||
bool borderless = false;
|
||||
bool centered = true;
|
||||
int display = 0;
|
||||
bool highdpi = false;
|
||||
bool sRGB = false;
|
||||
double refreshrate = 0.0;
|
||||
};
|
||||
|
||||
} // window
|
||||
} // love
|
||||
|
||||
@@ -57,14 +57,6 @@ Window::~Window()
|
||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||
}
|
||||
|
||||
Window::_currentMode::_currentMode()
|
||||
: width(800)
|
||||
, height(600)
|
||||
, settings()
|
||||
, icon(0)
|
||||
{
|
||||
}
|
||||
|
||||
bool Window::setWindow(int width, int height, WindowSettings *settings)
|
||||
{
|
||||
WindowSettings f;
|
||||
|
||||
@@ -111,10 +111,8 @@ private:
|
||||
|
||||
struct _currentMode
|
||||
{
|
||||
_currentMode();
|
||||
|
||||
int width;
|
||||
int height;
|
||||
int width = 800;
|
||||
int height = 600;
|
||||
WindowSettings settings;
|
||||
Object::StrongRef<love::image::ImageData> icon;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user