diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:19:14 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:19:14 +0200 |
commit | 01eb8253196672c969a39587e90b49321a182428 (patch) | |
tree | 4a3b71d7913de519744466c9227fda6461c4f0b5 /zen/com_util.h | |
parent | 5.0 (diff) | |
download | FreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.gz FreeFileSync-01eb8253196672c969a39587e90b49321a182428.tar.bz2 FreeFileSync-01eb8253196672c969a39587e90b49321a182428.zip |
5.1
Diffstat (limited to 'zen/com_util.h')
-rw-r--r-- | zen/com_util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zen/com_util.h b/zen/com_util.h index 2845e352..fe02eadd 100644 --- a/zen/com_util.h +++ b/zen/com_util.h @@ -82,7 +82,7 @@ std::vector<ComPtr<T> > convertEnum(const ComPtr<U>& enumObj) if (enumUnknown) { ComPtr<IUnknown> itemTmp; - while (enumUnknown->Next(1, itemTmp.init(), NULL) == S_OK) //returns S_FALSE == 1 when finished! Don't use SUCCEEDED()!!! + while (enumUnknown->Next(1, itemTmp.init(), nullptr) == S_OK) //returns S_FALSE == 1 when finished! Don't use SUCCEEDED()!!! { ComPtr<T> itemNew = com_dynamic_cast<T>(itemTmp); if (itemNew) @@ -103,11 +103,11 @@ std::wstring getText(ComPtr<T> comObj, MemFun memFun) if (!comObj) return std::wstring(); - BSTR bstr = NULL; + BSTR bstr = nullptr; if (FAILED((comObj.get()->*memFun)(&bstr))) return std::wstring(); - if (bstr) //NULL means "no text" + if (bstr) //nullptr means "no text" { text = std::wstring(bstr, ::SysStringLen(bstr)); //correctly copy 0-characters ::SysFreeString(bstr); |