From c8a119f274d08a226ac4a47a78af811c9f698386 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 2 Aug 2016 22:42:14 -0400 Subject: [PATCH] fix tool return bug -- value was never initialized for error constructor!!!! --- macos/tool_return.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/macos/tool_return.h b/macos/tool_return.h index 41c903b..844f905 100644 --- a/macos/tool_return.h +++ b/macos/tool_return.h @@ -11,10 +11,9 @@ namespace MacOS { class tool_return_base { protected: - macos_error _error; + macos_error _error = noErr; - tool_return_base() : _error(static_cast(0)) - {} + tool_return_base() = default; tool_return_base(macos_error error) : _error(error) {} @@ -41,7 +40,7 @@ namespace MacOS { class tool_return : public internal::tool_return_base { private: - T _value; + T _value = T(); tool_return() = delete;