[gnome-commander/ConvertWarningsToErrors] fix warning: don't shadow Filter member named type
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConvertWarningsToErrors] fix warning: don't shadow Filter member named type
- Date: Wed, 19 Apr 2017 20:06:26 +0000 (UTC)
commit 99449889459976afc8c67f714b373b7f90710e9e
Author: Andreas Henriksson <andreas fatal se>
Date: Tue Apr 18 23:31:30 2017 +0200
fix warning: don't shadow Filter member named type
filter.cc: In constructor ‘Filter::Filter(const gchar*, gboolean, Filter::Type)’:
filter.cc:31:63: error: declaration of ‘type’ shadows a member of ‘Filter’ [-Werror=shadow]
Filter::Filter(const gchar *exp, gboolean case_sens, Type type): re_exp(NULL), fn_exp(NULL), fn_flags(0)
^
In file included from filter.cc:26:0:
filter.h:37:10: note: shadowed declaration is here
Type type; // common stuff
^~~~
src/filter.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/filter.cc b/src/filter.cc
index 61005ce..da2fa59 100644
--- a/src/filter.cc
+++ b/src/filter.cc
@@ -28,11 +28,11 @@
using namespace std;
-Filter::Filter(const gchar *exp, gboolean case_sens, Type type): re_exp(NULL), fn_exp(NULL), fn_flags(0)
+Filter::Filter(const gchar *exp, gboolean case_sens, Type _type): re_exp(NULL), fn_exp(NULL), fn_flags(0)
{
- this->type = type;
+ this->type = _type;
- switch (type)
+ switch (_type)
{
case TYPE_REGEX:
re_exp = g_new (regex_t, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]