unused macro and update QTime to QElapsedTimer (#417)

This commit is contained in:
in1tiate 2021-01-19 05:30:56 -06:00 committed by GitHub
parent 75c1df5312
commit 21b4aa5072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,8 @@
#ifndef AOAPPLICATION_H
#define AOAPPLICATION_H
#define UNUSED(x) (void)(x)
#include "aopacket.h"
#include "datatypes.h"
#include "demoserver.h"

View File

@ -186,6 +186,10 @@ void AOApplication::call_announce_menu(Courtroom *court)
void CALLBACK AOApplication::BASSreset(HSTREAM handle, DWORD channel,
DWORD data, void *user)
{
UNUSED(handle);
UNUSED(channel);
UNUSED(data);
UNUSED(user);
doBASSreset();
}

View File

@ -150,6 +150,8 @@ void AOMusicPlayer::set_volume(int p_value, int channel)
void CALLBACK loopProc(HSYNC handle, DWORD channel, DWORD data, void *user)
{
UNUSED(handle);
UNUSED(data);
QWORD loop_start = *(static_cast<unsigned *>(user));
BASS_ChannelLock(channel, true);
BASS_ChannelSetPosition(channel, loop_start, BASS_POS_BYTE);

View File

@ -141,6 +141,7 @@ void Courtroom::set_char_select_page()
void Courtroom::on_char_list_double_clicked(QTreeWidgetItem *p_item, int column)
{
UNUSED(column);
int cid = p_item->text(1).toInt();
if (cid == -1 && !p_item->isExpanded()) {
p_item->setExpanded(true);

View File

@ -4355,6 +4355,7 @@ void Courtroom::set_sfx_dropdown()
void Courtroom::on_sfx_dropdown_changed(int p_index)
{
UNUSED(p_index);
ui_ic_chat_message->setFocus();
ui_sfx_remove->hide();
custom_sfx = "";
@ -4716,6 +4717,7 @@ void Courtroom::music_stop()
void Courtroom::on_area_list_double_clicked(QTreeWidgetItem *p_item, int column)
{
column = 0; // The metadata
UNUSED(column); // so gcc shuts up
QString p_area = p_item->text(0);
QStringList packet_contents;

View File

@ -131,7 +131,7 @@ void NetworkManager::on_srv_lookup()
qDebug() << "Connecting to " << record.target() << ":" << record.port();
#endif
ms_socket->connectToHost(record.target(), record.port());
QTime timer;
QElapsedTimer timer;
timer.start();
do {
ao_app->processEvents();