summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-04-15 17:31:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-04-15 17:31:28 +0100
commit91a73fb8e63636143c98bab962f36b349eac1421 (patch)
treed4983d59f7f26a1b95be562fe1e773f33944334c
parentconstexpr preprocessor component counts (diff)
downloadslicer-91a73fb8e63636143c98bab962f36b349eac1421.tar.bz2
slicer-91a73fb8e63636143c98bab962f36b349eac1421.tar.xz
slicer-91a73fb8e63636143c98bab962f36b349eac1421.zip
Fix shadowing
-rw-r--r--Jamroot.jam1
-rw-r--r--slicer/db/sqlInsertSerializer.cpp6
-rw-r--r--slicer/db/sqlTablePatchSerializer.cpp4
-rw-r--r--slicer/db/sqlUpdateSerializer.cpp6
-rw-r--r--slicer/slicer/modelPartsTypes.cpp2
5 files changed, 10 insertions, 9 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index 206829a..a143671 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -28,6 +28,7 @@ project
<variant>debug:<cflags>-Wnull-dereference
<variant>debug:<cflags>-Wdouble-promotion
<variant>debug:<cflags>-Wformat=2
+ <variant>debug:<cflags>-Wshadow
<toolset>gcc,<variant>debug:<cflags>-Wduplicated-cond
<toolset>gcc,<variant>debug:<cflags>-Wduplicated-branches
<toolset>gcc,<variant>debug:<cflags>-Wlogical-op
diff --git a/slicer/db/sqlInsertSerializer.cpp b/slicer/db/sqlInsertSerializer.cpp
index c45b028..58e30e2 100644
--- a/slicer/db/sqlInsertSerializer.cpp
+++ b/slicer/db/sqlInsertSerializer.cpp
@@ -102,10 +102,10 @@ namespace Slicer {
};
void
- SqlFetchIdInsertSerializer::bindObjectAndExecute(const Slicer::ModelPartPtr & cmp, DB::ModifyCommand * ins) const
+ SqlFetchIdInsertSerializer::bindObjectAndExecute(const Slicer::ModelPartPtr & mp, DB::ModifyCommand * ins) const
{
- SqlAutoIdInsertSerializer::bindObjectAndExecute(cmp, ins);
- cmp->OnEachChild([this](const std::string &, const ModelPartPtr & cmp, const HookCommon * h) {
+ SqlAutoIdInsertSerializer::bindObjectAndExecute(mp, ins);
+ mp->OnEachChild([this](const std::string &, const ModelPartPtr & cmp, const HookCommon * h) {
if (isAuto(h)) {
cmp->SetValue(IdSave(connection));
}
diff --git a/slicer/db/sqlTablePatchSerializer.cpp b/slicer/db/sqlTablePatchSerializer.cpp
index b95aeff..3b73f05 100644
--- a/slicer/db/sqlTablePatchSerializer.cpp
+++ b/slicer/db/sqlTablePatchSerializer.cpp
@@ -11,8 +11,8 @@
namespace Slicer {
AdHocFormatter(ttname, "slicer_tmp_%?");
- SqlTablePatchSerializer::SqlTablePatchSerializer(DB::Connection * const db, DB::TablePatch & tp) :
- db(db), tablePatch(tp)
+ SqlTablePatchSerializer::SqlTablePatchSerializer(DB::Connection * const d, DB::TablePatch & tp) :
+ db(d), tablePatch(tp)
{
tablePatch.src = ttname::get(this);
}
diff --git a/slicer/db/sqlUpdateSerializer.cpp b/slicer/db/sqlUpdateSerializer.cpp
index 0cd3c02..038f28e 100644
--- a/slicer/db/sqlUpdateSerializer.cpp
+++ b/slicer/db/sqlUpdateSerializer.cpp
@@ -56,10 +56,10 @@ namespace Slicer {
}
void
- SqlUpdateSerializer::bindObjectAndExecute(const Slicer::ModelPartPtr & cmp, DB::ModifyCommand * upd)
+ SqlUpdateSerializer::bindObjectAndExecute(const Slicer::ModelPartPtr & mp, DB::ModifyCommand * upd)
{
unsigned int paramNo = 0;
- cmp->OnEachChild([&upd, &paramNo](const std::string &, const ModelPartPtr & cmp, const HookCommon * h) {
+ mp->OnEachChild([&upd, &paramNo](const std::string &, const ModelPartPtr & cmp, const HookCommon * h) {
if (isValue(h)) {
if (!cmp->GetValue(SqlBinder(*upd, paramNo))) {
upd->bindNull(paramNo);
@@ -67,7 +67,7 @@ namespace Slicer {
paramNo++;
}
});
- cmp->OnEachChild([&upd, &paramNo](const std::string &, const ModelPartPtr & cmp, const HookCommon * h) {
+ mp->OnEachChild([&upd, &paramNo](const std::string &, const ModelPartPtr & cmp, const HookCommon * h) {
if (isPKey(h)) {
cmp->GetValue(SqlBinder(*upd, paramNo++));
}
diff --git a/slicer/slicer/modelPartsTypes.cpp b/slicer/slicer/modelPartsTypes.cpp
index f69c96c..47543a6 100644
--- a/slicer/slicer/modelPartsTypes.cpp
+++ b/slicer/slicer/modelPartsTypes.cpp
@@ -413,7 +413,7 @@ namespace Slicer {
return true;
}
// Stream Roots
- ModelPartForStreamRootBase::ModelPartForStreamRootBase(const ModelPartPtr & mp) : ModelPartForRootBase(mp) { }
+ ModelPartForStreamRootBase::ModelPartForStreamRootBase(const ModelPartPtr & m) : ModelPartForRootBase(m) { }
// NOLINTNEXTLINE(hicpp-no-array-decay)
void
ModelPartForStreamRootBase::Write(Ice::OutputStream &) const