summaryrefslogtreecommitdiffstats
path: root/Source/cmVSSetupHelper.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 19:11:07 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 17:39:45 (GMT)
commit4deab0a75c0da66938c230a446af5ecd6f3c5ca3 (patch)
treeda2a018bdb2564934dbea62c60111c5f55c5dbce /Source/cmVSSetupHelper.h
parent714a466eeb42809fa56d78d6aef6cde70d938af5 (diff)
downloadCMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.zip
CMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.tar.gz
CMake-4deab0a75c0da66938c230a446af5ecd6f3c5ca3.tar.bz2
clang-tidy: fix `readability-braces-around-statements` lints
Diffstat (limited to 'Source/cmVSSetupHelper.h')
-rw-r--r--Source/cmVSSetupHelper.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmVSSetupHelper.h b/Source/cmVSSetupHelper.h
index 4ef7e15..b8be9b9 100644
--- a/Source/cmVSSetupHelper.h
+++ b/Source/cmVSSetupHelper.h
@@ -21,14 +21,16 @@ public:
SmartCOMPtr(T* p)
{
ptr = p;
- if (ptr != nullptr)
+ if (ptr != nullptr) {
ptr->AddRef();
+ }
}
SmartCOMPtr(const SmartCOMPtr<T>& sptr)
{
ptr = sptr.ptr;
- if (ptr != nullptr)
+ if (ptr != nullptr) {
ptr->AddRef();
+ }
}
T** operator&() { return &ptr; }
T* operator->() { return ptr; }
@@ -36,8 +38,9 @@ public:
{
if (*this != p) {
ptr = p;
- if (ptr != nullptr)
+ if (ptr != nullptr) {
ptr->AddRef();
+ }
}
return *this;
}
@@ -59,8 +62,9 @@ public:
}
~SmartCOMPtr()
{
- if (ptr != nullptr)
+ if (ptr != nullptr) {
ptr->Release();
+ }
}
private: