summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jamroot.jam7
-rw-r--r--libadhocutil/globalStatic.impl.h2
-rw-r--r--libadhocutil/plugins.impl.h2
-rw-r--r--libadhocutil/unittests/Jamfile.jam1
4 files changed, 8 insertions, 4 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index 87fee9b..9da91b4 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -33,9 +33,10 @@ project
<toolset>gcc,<variant>debug:<cflags>-Wlogical-op
<toolset>gcc,<variant>debug:<cflags>-Wuseless-cast
<variant>coverage:<coverage>on
- <toolset>tidy:<exclude>bin/sys.h
- <toolset>tidy:<exclude>bin/net.h
- <toolset>tidy:<exclude>unittests/bin/lorem-ipsum.h
+ <toolset>tidy:<enable>all
+ <toolset>tidy:<exclude>libadhocutil/bin/sys.h
+ <toolset>tidy:<exclude>libadhocutil/bin/net.h
+ <toolset>tidy:<exclude>libadhocutil/unittests/bin/lorem-ipsum.h
<toolset>tidy:<checkxx>boost-*
<toolset>tidy:<checkxx>bugprone-*
<toolset>tidy:<xcheckxx>bugprone-macro-parentheses
diff --git a/libadhocutil/globalStatic.impl.h b/libadhocutil/globalStatic.impl.h
index 61314ea..4845b33 100644
--- a/libadhocutil/globalStatic.impl.h
+++ b/libadhocutil/globalStatic.impl.h
@@ -29,7 +29,7 @@ namespace AdHoc {
typename GlobalStatic<Object>::Ptr &
GlobalStatic<Object>::instance()
{
- static Ptr _instance;
+ static Ptr _instance {};
return _instance;
}
}
diff --git a/libadhocutil/plugins.impl.h b/libadhocutil/plugins.impl.h
index 772d37a..90e3070 100644
--- a/libadhocutil/plugins.impl.h
+++ b/libadhocutil/plugins.impl.h
@@ -20,6 +20,8 @@ namespace AdHoc {
const std::type_info &
PluginOf<T>::type() const
{
+ static_assert(std::is_reference_v<decltype(typeid(T))>);
+ // cppcheck-suppress returnTempReference; (typeid returns a reference)
return typeid(T);
}
diff --git a/libadhocutil/unittests/Jamfile.jam b/libadhocutil/unittests/Jamfile.jam
index cb6e9e3..bbcf2e3 100644
--- a/libadhocutil/unittests/Jamfile.jam
+++ b/libadhocutil/unittests/Jamfile.jam
@@ -23,6 +23,7 @@ project
<toolset>tidy:<xcheckxx>bugprone-use-after-move
<toolset>tidy:<xcheckxx>hicpp-invalid-access-moved
<toolset>tidy:<suppress>accessMoved
+ <toolset>tidy:<suppress>literalWithCharPtrCompare
;
h lorem-ipsum : lorem-ipsum.txt ;