[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kmymoney/frameworks] kmymoney/mymoney: Minor improvements
From:       Christian_Dávid <christian-david () web ! de>
Date:       2016-06-14 11:01:21
Message-ID: E1bCm5x-0005jC-Dx () scm ! kde ! org
[Download RAW message or body]

Git commit ccb1833e2201d05c1af44b630f1192a2a82f0def by Christian Dávid.
Committed on 14/06/2016 at 10:40.
Pushed by christiand into branch 'frameworks'.

Minor improvements

Removed unused code. Use std::unique_ptr.

M  +0    -13   kmymoney/mymoney/mymoneymoney.h
M  +1    -6    kmymoney/mymoney/tests/mymoneysecurity-test.cpp
M  +2    -2    kmymoney/mymoney/tests/mymoneysecurity-test.h

http://commits.kde.org/kmymoney/ccb1833e2201d05c1af44b630f1192a2a82f0def

diff --git a/kmymoney/mymoney/mymoneymoney.h b/kmymoney/mymoney/mymoneymoney.h
index a8712ab..72f98be 100644
--- a/kmymoney/mymoney/mymoneymoney.h
+++ b/kmymoney/mymoney/mymoneymoney.h
@@ -36,19 +36,6 @@
 #include "mymoneyunittestable.h"
 #include "mymoneyexception.h"
 
-// Check for standard definitions
-#ifdef HAVE_STDINT_H
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS         // force definition of min and max values
-#endif
-#include <stdint.h>
-#else
-#include <limits.h>
-#define INT64_MAX LLONG_MAX
-#define INT64_MIN LLONG_MIN
-#endif
-
-// Including the AlkValue class
 #include <alkimia/alkvalue.h>
 
 typedef qint64 signed64;
diff --git a/kmymoney/mymoney/tests/mymoneysecurity-test.cpp \
b/kmymoney/mymoney/tests/mymoneysecurity-test.cpp index dcda825..f0901b0 100644
--- a/kmymoney/mymoney/tests/mymoneysecurity-test.cpp
+++ b/kmymoney/mymoney/tests/mymoneysecurity-test.cpp
@@ -22,12 +22,7 @@ QTEST_MAIN(MyMoneySecurityTest)
 
 void MyMoneySecurityTest::init()
 {
-  m = new MyMoneySecurity();
-}
-
-void MyMoneySecurityTest::cleanup()
-{
-  delete m;
+  m.reset(new MyMoneySecurity());
 }
 
 void MyMoneySecurityTest::testEmptyConstructor()
diff --git a/kmymoney/mymoney/tests/mymoneysecurity-test.h \
b/kmymoney/mymoney/tests/mymoneysecurity-test.h index a77b31b..bab6b08 100644
--- a/kmymoney/mymoney/tests/mymoneysecurity-test.h
+++ b/kmymoney/mymoney/tests/mymoneysecurity-test.h
@@ -17,6 +17,7 @@
 #ifndef MYMONEYSECURITYTEST_H
 #define MYMONEYSECURITYTEST_H
 
+#include <memory>
 #include <QtCore/QObject>
 
 #include "mymoneysecurity.h"
@@ -26,11 +27,10 @@ class MyMoneySecurityTest : public QObject
   Q_OBJECT
 
 protected:
-  MyMoneySecurity *m;
+  std::unique_ptr<MyMoneySecurity> m;
 
 private slots:
   void init();
-  void cleanup();
   void testEmptyConstructor();
   void testNonemptyConstructor();
   void testCopyConstructor();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic