summaryrefslogtreecommitdiff
path: root/ui/qt/capture_interfaces_dialog.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-03-29 09:45:29 -0700
committerGuy Harris <guy@alum.mit.edu>2017-03-29 16:45:58 +0000
commitf8c870eee23915aee30bfabe20e2f14a95cad560 (patch)
tree7eb708b69774d55f383606f266bd61847ebd4d2f /ui/qt/capture_interfaces_dialog.cpp
parent25dc3ee9fde080d2098fe0fc7b207757b8b7c6e0 (diff)
downloadwireshark-f8c870eee23915aee30bfabe20e2f14a95cad560.tar.gz
Throw in a cast to squelch a compiler warning.
MSVC warns that comparing a gboolean (which is a typedef for int) to a bool is unsafe; convert the gboolean to a bool (the post-C++11 draft C++ standard I have says that the conversion from integral to bool does pretty much what you'd expect - zero goes to false, non-zero goes to true - and is exactly what we want). Change-Id: Ia7d7b62baf87ca3a29da5140f68c2c5b38b2d6de Reviewed-on: https://code.wireshark.org/review/20787 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/capture_interfaces_dialog.cpp')
-rw-r--r--ui/qt/capture_interfaces_dialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp
index 9a51919d2a..128f7f65ff 100644
--- a/ui/qt/capture_interfaces_dialog.cpp
+++ b/ui/qt/capture_interfaces_dialog.cpp
@@ -286,7 +286,7 @@ void CaptureInterfacesDialog::updateFromGlobalDeviceSelections()
for (guint i = 0; i < global_capture_opts.all_ifaces->len; i++) {
interface_t device = g_array_index(global_capture_opts.all_ifaces, interface_t, i);
if (device_name.compare(QString().fromUtf8(device.name)) == 0) {
- if (device.selected != (*iter)->isSelected()) {
+ if ((bool)device.selected != (*iter)->isSelected()) {
(*iter)->setSelected(device.selected);
}
break;