mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Minor code cleanup
This commit is contained in:
@@ -30,7 +30,7 @@ namespace sdl
|
||||
{
|
||||
|
||||
Cursor::Cursor(image::ImageData *data, int hotx, int hoty)
|
||||
: cursor(0)
|
||||
: cursor(nullptr)
|
||||
, type(CURSORTYPE_IMAGE)
|
||||
, systemType(CURSOR_MAX_ENUM)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ Cursor::Cursor(image::ImageData *data, int hotx, int hoty)
|
||||
}
|
||||
|
||||
Cursor::Cursor(mouse::Cursor::SystemCursor cursortype)
|
||||
: cursor(0)
|
||||
: cursor(nullptr)
|
||||
, type(CURSORTYPE_SYSTEM)
|
||||
, systemType(cursortype)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ const char *Mouse::getName() const
|
||||
}
|
||||
|
||||
Mouse::Mouse()
|
||||
: curCursor(0)
|
||||
: curCursor(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ void Mouse::setVisible(bool visible)
|
||||
|
||||
bool Mouse::isDown(Button *buttonlist) const
|
||||
{
|
||||
Uint32 buttonstate = SDL_GetMouseState(0, 0);
|
||||
Uint32 buttonstate = SDL_GetMouseState(nullptr, nullptr);
|
||||
|
||||
for (Button button = *buttonlist; button != BUTTON_MAX_ENUM; button = *(++buttonlist))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user