From 52cb094f0f16241fd805bce41d91818303216393 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 16 Aug 2016 13:00:07 -0400 Subject: [PATCH] A safenew and comment changes --- src/DirManager.h | 2 +- src/MemoryX.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DirManager.h b/src/DirManager.h index 4833870a8..c322f8388 100644 --- a/src/DirManager.h +++ b/src/DirManager.h @@ -185,7 +185,7 @@ class PROFILE_DLL_API DirManager final : public XMLTagHandler { } mBalanceInfo; // Accessor for the balance info, may need to do a delayed update for - // deletion in case other threads delete block files + // deletion in case other threads DELETE block files BalanceInfo &GetBalanceInfo(); void BalanceInfoDel(const wxString&); diff --git a/src/MemoryX.h b/src/MemoryX.h index 2d053e6e9..24f301f3f 100644 --- a/src/MemoryX.h +++ b/src/MemoryX.h @@ -380,7 +380,7 @@ you don't use something like std::move(p) or q.release(). Both expressions requ that you identify the type only once, which is brief and less error prone. (Whereas this omission of [] might invite a runtime error: -std::unique_ptr q { new Myclass[count] }; ) +std::unique_ptr q { safenew Myclass[count] }; ) Some C++11 tricks needed here are (1) variadic argument lists and (2) making the compile-time dispatch work correctly. You can't have @@ -511,7 +511,7 @@ public: * with *, ->, get(), reset(), or in if() */ -// Placement-new is used below, and that does not cooperate with the DEBUG_NEW for Visual Studio +// Placement-NEW is used below, and that does not cooperate with the DEBUG_NEW for Visual Studio #ifdef _DEBUG #ifdef _MSC_VER #undef new