mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Reduce casts to (void)
This commit is contained in:
parent
b71ff372c7
commit
e1f36e66a5
@ -245,9 +245,8 @@ void getScreenSizeInPixels(ANativeActivity* activity, int* width, int* height)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onStart(ANativeActivity* activity)
|
static void onStart(ANativeActivity* /* activity */)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -285,9 +284,8 @@ static void onPause(ANativeActivity* activity)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onStop(ANativeActivity* activity)
|
static void onStop(ANativeActivity* /* activity */)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -340,8 +338,6 @@ static void onDestroy(ANativeActivity* activity)
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* window)
|
static void onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* window)
|
||||||
{
|
{
|
||||||
(void) window;
|
|
||||||
|
|
||||||
sf::priv::ActivityStates* states = sf::priv::retrieveStates(activity);
|
sf::priv::ActivityStates* states = sf::priv::retrieveStates(activity);
|
||||||
std::scoped_lock lock(states->mutex);
|
std::scoped_lock lock(states->mutex);
|
||||||
|
|
||||||
@ -365,10 +361,8 @@ static void onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* wind
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onNativeWindowDestroyed(ANativeActivity* activity, ANativeWindow* window)
|
static void onNativeWindowDestroyed(ANativeActivity* activity, ANativeWindow* /* window */)
|
||||||
{
|
{
|
||||||
(void) window;
|
|
||||||
|
|
||||||
sf::priv::ActivityStates* states = sf::priv::retrieveStates(activity);
|
sf::priv::ActivityStates* states = sf::priv::retrieveStates(activity);
|
||||||
std::scoped_lock lock(states->mutex);
|
std::scoped_lock lock(states->mutex);
|
||||||
|
|
||||||
@ -392,18 +386,14 @@ static void onNativeWindowDestroyed(ANativeActivity* activity, ANativeWindow* wi
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onNativeWindowRedrawNeeded(ANativeActivity* activity, ANativeWindow* window)
|
static void onNativeWindowRedrawNeeded(ANativeActivity* /* activity */, ANativeWindow* /* window */)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
(void) window;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onNativeWindowResized(ANativeActivity* activity, ANativeWindow* window)
|
static void onNativeWindowResized(ANativeActivity* /* activity */, ANativeWindow* /* window */)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
(void) window;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -442,18 +432,14 @@ static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onWindowFocusChanged(ANativeActivity* activity, int focused)
|
static void onWindowFocusChanged(ANativeActivity* /* activity */, int /* focused */)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
(void) focused;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onContentRectChanged(ANativeActivity* activity, const ARect* rect)
|
static void onContentRectChanged(ANativeActivity* activity, const ARect* /* rect */)
|
||||||
{
|
{
|
||||||
(void) rect;
|
|
||||||
|
|
||||||
// Retrieve our activity states from the activity instance
|
// Retrieve our activity states from the activity instance
|
||||||
sf::priv::ActivityStates* states = sf::priv::retrieveStates(activity);
|
sf::priv::ActivityStates* states = sf::priv::retrieveStates(activity);
|
||||||
std::scoped_lock lock(states->mutex);
|
std::scoped_lock lock(states->mutex);
|
||||||
@ -472,16 +458,14 @@ static void onContentRectChanged(ANativeActivity* activity, const ARect* rect)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onConfigurationChanged(ANativeActivity* activity)
|
static void onConfigurationChanged(ANativeActivity* /* activity */)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void* onSaveInstanceState(ANativeActivity* activity, size_t* outLen)
|
static void* onSaveInstanceState(ANativeActivity* /* activity */, size_t* outLen)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
*outLen = 0;
|
*outLen = 0;
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -489,9 +473,8 @@ static void* onSaveInstanceState(ANativeActivity* activity, size_t* outLen)
|
|||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void onLowMemory(ANativeActivity* activity)
|
static void onLowMemory(ANativeActivity* /* activity */)
|
||||||
{
|
{
|
||||||
(void) activity;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,12 +48,9 @@ namespace
|
|||||||
EGLDisplay display = EGL_NO_DISPLAY;
|
EGLDisplay display = EGL_NO_DISPLAY;
|
||||||
int waitingForFlip = 0;
|
int waitingForFlip = 0;
|
||||||
|
|
||||||
static void pageFlipHandler(int fd, unsigned int frame,
|
static void pageFlipHandler(int /* fd */, unsigned int /* frame */,
|
||||||
unsigned int sec, unsigned int usec, void* data)
|
unsigned int /* sec */, unsigned int /* usec */, void* data)
|
||||||
{
|
{
|
||||||
// suppress unused param warning
|
|
||||||
(void)fd, (void)frame, (void)sec, (void)usec;
|
|
||||||
|
|
||||||
int* temp = static_cast<int*>(data);
|
int* temp = static_cast<int*>(data);
|
||||||
*temp = 0;
|
*temp = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user