From 222f0c607ba78446f1bd49c05209d92f4a573e7c Mon Sep 17 00:00:00 2001 From: amazing-username Date: Tue, 25 Apr 2017 15:17:19 -0500 Subject: [PATCH] Encryption, Decryption works --- Cryption.h | 4 ++-- Decryption.cpp | 2 +- Main.cpp | 4 ++-- MessagingControls.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cryption.h b/Cryption.h index 0096c40..f47cf7b 100644 --- a/Cryption.h +++ b/Cryption.h @@ -15,8 +15,8 @@ public: protected: void setMessage(const std::string&); - std::string message; - std::fstream ioEvent; + std::string message{}; + std::fstream ioEvent{}; }; #endif diff --git a/Decryption.cpp b/Decryption.cpp index d8a3e98..a3e9556 100644 --- a/Decryption.cpp +++ b/Decryption.cpp @@ -65,7 +65,7 @@ std::string Decryption::cstringToString(char tmp[], const int& SIZE) unsigned short getTwoNumberedKey(unsigned short& number) { - std::string wholeNumber = std::to_string(number); + std::string wholeNumber{std::to_string(number)}; char hundred[] = {wholeNumber.at(0)}; char ten[] = {wholeNumber.at(1)}; char one[] {wholeNumber.at(2)}; diff --git a/Main.cpp b/Main.cpp index 1093fd7..e058d8c 100644 --- a/Main.cpp +++ b/Main.cpp @@ -5,9 +5,9 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); - MessagingControls* stuff = new MessagingControls;; + MessagingControls stuff{}; - stuff->show(); + stuff.show(); return app.exec(); } diff --git a/MessagingControls.h b/MessagingControls.h index 915c742..3524d3a 100644 --- a/MessagingControls.h +++ b/MessagingControls.h @@ -67,10 +67,10 @@ private: std::string grabCryptionText(); - unsigned short mainWindowHeight = 450; - unsigned short mainWindowWidth = 550; + int mainWindowHeight{450}; + int mainWindowWidth{550}; - bool cryptionChoice; + bool cryptionChoice{}; }; #endif