diff options
author | Tobias Markmann <tm@ayena.de> | 2016-09-29 15:22:52 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-09-29 15:22:52 (GMT) |
commit | 9abfaaa771f91010dbe01a1b9b5b9e2801956718 (patch) | |
tree | 618a5f66ea97d3d8552f72aad6a8e1313c56ec6e /Sluift | |
parent | 2bf44a1d641c3bc35546cb49d3766f2962f9a984 (diff) | |
download | swift-9abfaaa771f91010dbe01a1b9b5b9e2801956718.zip swift-9abfaaa771f91010dbe01a1b9b5b9e2801956718.tar.bz2 |
Fix uninitialised class members
Initialised previously uninitialised class members. Changed
some raw pointers to std::unique_ptr for clearer and
automatically initialised code.
Test-Information:
Builds on macOS 10.12 and unit tests pass in ASAN-enabled
build.
Change-Id: I7900fe6131119c228ca92c79c0ee8125137f2e48
Diffstat (limited to 'Sluift')
-rw-r--r-- | Sluift/SluiftClient.h | 4 | ||||
-rw-r--r-- | Sluift/SluiftComponent.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Sluift/SluiftClient.h b/Sluift/SluiftClient.h index 1b0dd43..2c221e6 100644 --- a/Sluift/SluiftClient.h +++ b/Sluift/SluiftClient.h @@ -123,10 +123,10 @@ namespace Swift { Client* client; ClientOptions options; ClientXMLTracer* tracer; - bool rosterReceived; + bool rosterReceived = false; std::deque<Event> pendingEvents; boost::optional<ClientError> disconnectedError; - bool requestResponseReceived; + bool requestResponseReceived = false; std::shared_ptr<Payload> requestResponse; std::shared_ptr<ErrorPayload> requestError; }; diff --git a/Sluift/SluiftComponent.h b/Sluift/SluiftComponent.h index 675d6c0..d45c3b2 100644 --- a/Sluift/SluiftComponent.h +++ b/Sluift/SluiftComponent.h @@ -102,7 +102,7 @@ namespace Swift { ComponentXMLTracer* tracer; std::deque<Event> pendingEvents; boost::optional<ComponentError> disconnectedError; - bool requestResponseReceived; + bool requestResponseReceived = false; std::shared_ptr<Payload> requestResponse; std::shared_ptr<ErrorPayload> requestError; }; |