summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2023-01-09 10:32:47 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2023-01-09 10:51:07 +0800
commit52b379e0a814f35a5f3f2bcfc259abb3ed1c0473 (patch)
tree52655cde0e52f1d924c32a51b59f11200a90fda8
parentd661472529852c358f2ff441dcc396db3027075a (diff)
downloadglibmm-52b379e0a814f35a5f3f2bcfc259abb3ed1c0473.tar.gz
liststore.hg: Rename a local variable
In the templatized implementation of std::pair<bool, unsigned int> ListStore<T_item>::find, replace 'result' with 'find_result' for what g_list_store_find_with_equal_func_full() returns, to avoid a compiler warning when building the giomm_listmodel test program when '-Dwarnings=max' is specified, for Visual Studio builds, as we are using a variable 'result' in a rather global scrope there[1]. This will help fix 'meson dist' on Visual Studio builds. [1]: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4459
-rw-r--r--gio/src/liststore.hg4
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/src/liststore.hg b/gio/src/liststore.hg
index 58b51997..07fe0257 100644
--- a/gio/src/liststore.hg
+++ b/gio/src/liststore.hg
@@ -412,10 +412,10 @@ std::pair<bool, unsigned int> ListStore<T_item>::find(
auto slot_ptr = const_cast<SlotEqual*>(&slot);
unsigned int position = std::numeric_limits<unsigned int>::max();
- bool result = g_list_store_find_with_equal_func_full(
+ bool find_result = g_list_store_find_with_equal_func_full(
const_cast<GListStore*>(gobj()), const_cast<typename T_item::BaseObjectType*>(item->gobj()),
&equal_func_full, slot_ptr, &position);
- return {result, position};
+ return {find_result, position};
}
template <typename T_item>