GUI: Suppress Unused Variable Warning For Some Build Configurations.

This fix is not totally clean as it spuriously uses the
serverLabelPosition variable in one case of the preprocessor ifdef
configuration, but with the current structure, this is a simple hack to
fix.

A better solution would be to rewrite some of these functions to remove
some of the preprocessor usage if possible.
This commit is contained in:
D G Turner 2017-01-10 06:27:09 +00:00
parent b7d963e214
commit 2ab0927407

View File

@ -2120,8 +2120,10 @@ void GlobalOptionsDialog::setupCloudTab() {
#else // USE_SDL_NET
if (_runServerButton)
_runServerButton->setVisible(false);
if (_serverInfoLabel)
if (_serverInfoLabel) {
_serverInfoLabel->setPos(_serverInfoLabel->getRelX(), serverLabelPosition); // Prevent compiler warning from serverLabelPosition being unused.
_serverInfoLabel->setVisible(false);
}
if (_rootPathButton)
_rootPathButton->setVisible(false);
if (_rootPath)