replaced pointer by smart pointers
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "hardwaresetup.h"
|
||||
#include "timemodel.h"
|
||||
#include <QMainWindow>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -16,7 +17,7 @@ class Training : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Training(QWidget * parent, DataBase * db);
|
||||
explicit Training(QWidget * parent, std::shared_ptr<DataBase> db);
|
||||
~Training();
|
||||
|
||||
private:
|
||||
@@ -26,7 +27,7 @@ class Training : public QMainWindow {
|
||||
|
||||
void closeEvent(QCloseEvent * event);
|
||||
bool started;
|
||||
HardwareSetup * Hardware;
|
||||
std::shared_ptr<HardwareSetup> Hardware;
|
||||
bool firstTimeShell;
|
||||
bool firstTimeDea;
|
||||
QVector<QVector<int>> VecShell;
|
||||
@@ -37,7 +38,7 @@ class Training : public QMainWindow {
|
||||
bool finished;
|
||||
Counter counterShell;
|
||||
Counter counterDea;
|
||||
DataBase * db;
|
||||
std::shared_ptr<DataBase> db;
|
||||
long minTimeOneRound;
|
||||
int minimumTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user