mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
cleanup: remove unnecessary Q_UNUSED macros
Also remove the UNUSED() macro, as there were no users left. The macro was silly anyway - there were many falso positives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5960fb7340
commit
4d183637d0
5 changed files with 8 additions and 19 deletions
|
@ -156,12 +156,10 @@ int get_usb_fd(uint16_t idVendor, uint16_t idProduct)
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setUsbDevice(JNIEnv *env,
|
Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setUsbDevice(JNIEnv *,
|
||||||
jobject obj,
|
jobject,
|
||||||
jobject javaUsbDevice)
|
jobject javaUsbDevice)
|
||||||
{
|
{
|
||||||
Q_UNUSED (obj)
|
|
||||||
Q_UNUSED (env)
|
|
||||||
QAndroidJniObject usbDevice(javaUsbDevice);
|
QAndroidJniObject usbDevice(javaUsbDevice);
|
||||||
if (usbDevice.isValid()) {
|
if (usbDevice.isValid()) {
|
||||||
android_usb_serial_device_descriptor descriptor = getDescriptor(usbDevice);
|
android_usb_serial_device_descriptor descriptor = getDescriptor(usbDevice);
|
||||||
|
@ -175,12 +173,10 @@ Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setUsbDevice(JNIEnv *
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_restartDownload(JNIEnv *env,
|
Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_restartDownload(JNIEnv *,
|
||||||
jobject obj,
|
jobject,
|
||||||
jobject javaUsbDevice)
|
jobject javaUsbDevice)
|
||||||
{
|
{
|
||||||
Q_UNUSED (obj)
|
|
||||||
Q_UNUSED (env)
|
|
||||||
QAndroidJniObject usbDevice(javaUsbDevice);
|
QAndroidJniObject usbDevice(javaUsbDevice);
|
||||||
if (usbDevice.isValid()) {
|
if (usbDevice.isValid()) {
|
||||||
android_usb_serial_device_descriptor descriptor = getDescriptor(usbDevice);
|
android_usb_serial_device_descriptor descriptor = getDescriptor(usbDevice);
|
||||||
|
|
|
@ -233,9 +233,8 @@ QStringList DCDeviceData::getProductListFromVendor(const QString &vendor)
|
||||||
return productList[vendor];
|
return productList[vendor];
|
||||||
}
|
}
|
||||||
|
|
||||||
int DCDeviceData::getMatchingAddress(const QString &vendor, const QString &product)
|
int DCDeviceData::getMatchingAddress(const QString &, const QString &product)
|
||||||
{
|
{
|
||||||
Q_UNUSED(vendor)
|
|
||||||
return connectionListModel.indexOf(product);
|
return connectionListModel.indexOf(product);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,4 @@
|
||||||
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Macro to be used for silencing unused parameters
|
|
||||||
#define UNUSED(x) (void)x
|
|
||||||
|
|
||||||
#endif // SSRF_H
|
#endif // SSRF_H
|
||||||
|
|
|
@ -259,9 +259,8 @@ void TabDiveInformation::updateUi(QString titleColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
// From the index of the water type combo box, set the dive->salinity to an appropriate value
|
// From the index of the water type combo box, set the dive->salinity to an appropriate value
|
||||||
void TabDiveInformation::on_waterTypeCombo_activated(int index)
|
void TabDiveInformation::on_waterTypeCombo_activated(int)
|
||||||
{
|
{
|
||||||
Q_UNUSED(index)
|
|
||||||
int combobox_salinity = 0;
|
int combobox_salinity = 0;
|
||||||
int dc_salinity = parent.currentDive->salinity;
|
int dc_salinity = parent.currentDive->salinity;
|
||||||
switch(ui->waterTypeCombo->currentIndex()) {
|
switch(ui->waterTypeCombo->currentIndex()) {
|
||||||
|
@ -410,9 +409,8 @@ void TabDiveInformation::on_watertemp_editingFinished()
|
||||||
divesEdited(Command::editWaterTemp(parseTemperatureToMkelvin(ui->watertemp->text()), false));
|
divesEdited(Command::editWaterTemp(parseTemperatureToMkelvin(ui->watertemp->text()), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabDiveInformation::on_atmPressType_currentIndexChanged(int index)
|
void TabDiveInformation::on_atmPressType_currentIndexChanged(int)
|
||||||
{
|
{
|
||||||
Q_UNUSED(index)
|
|
||||||
updateTextBox(COMBO_CHANGED);
|
updateTextBox(COMBO_CHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2331,9 +2331,8 @@ void QMLManager::rememberOldStatus()
|
||||||
setOldStatus((qPrefCloudStorage::cloud_status)qPrefCloudStorage::cloud_verification_status());
|
setOldStatus((qPrefCloudStorage::cloud_status)qPrefCloudStorage::cloud_verification_status());
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMLManager::divesChanged(const QVector<dive *> &dives, DiveField field)
|
void QMLManager::divesChanged(const QVector<dive *> &dives, DiveField)
|
||||||
{
|
{
|
||||||
Q_UNUSED(field)
|
|
||||||
for (struct dive *d: dives) {
|
for (struct dive *d: dives) {
|
||||||
report_info("dive #%d changed, cache is %s", d->number, dive_cache_is_valid(d) ? "valid" : "invalidated");
|
report_info("dive #%d changed, cache is %s", d->number, dive_cache_is_valid(d) ? "valid" : "invalidated");
|
||||||
// a brute force way to deal with that would of course be to call
|
// a brute force way to deal with that would of course be to call
|
||||||
|
|
Loading…
Reference in a new issue