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 /Swift/Controllers/UnitTest | |
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 'Swift/Controllers/UnitTest')
-rw-r--r-- | Swift/Controllers/UnitTest/MockChatWindow.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Swift/Controllers/UnitTest/MockChatWindow.h b/Swift/Controllers/UnitTest/MockChatWindow.h index 054cd31..9b943f0 100644 --- a/Swift/Controllers/UnitTest/MockChatWindow.h +++ b/Swift/Controllers/UnitTest/MockChatWindow.h @@ -14,7 +14,7 @@ namespace Swift { class MockChatWindow : public ChatWindow { public: - MockChatWindow() : labelsEnabled_(false), impromptuMUCSupported_(false) {} + MockChatWindow() {} virtual ~MockChatWindow(); virtual std::string addMessage(const ChatMessage& message, const std::string& senderName, bool senderIsSelf, std::shared_ptr<SecurityLabel> /*label*/, const std::string& /*avatarPath*/, const boost::posix_time::ptime& /*time*/) { @@ -128,21 +128,21 @@ namespace Swift { std::string name_; ChatMessage lastAddedMessage_; std::string lastAddedMessageSenderName_; - bool lastAddedMessageSenderIsSelf_; + bool lastAddedMessageSenderIsSelf_ = false; ChatMessage lastAddedAction_; std::string lastAddedActionSenderName_; - bool lastAddedActionSenderIsSelf_; + bool lastAddedActionSenderIsSelf_ = false; ChatMessage lastAddedPresence_; ChatMessage lastReplacedMessage_; ChatMessage lastAddedSystemMessage_; ChatMessage lastReplacedSystemMessage_; - ChatMessage lastAddedErrorMessage_; + ChatMessage lastAddedErrorMessage_; JID lastMUCInvitationJID_; std::vector<SecurityLabelsCatalog::Item> labels_; - bool labelsEnabled_; - bool impromptuMUCSupported_; + bool labelsEnabled_ = false; + bool impromptuMUCSupported_ = false; SecurityLabelsCatalog::Item label_; - Roster* roster_; + Roster* roster_ = nullptr; std::vector<std::pair<std::string, ReceiptState>> receiptChanges_; }; } |