@@ -21,23 +21,11 class ArrayData { | |||
|
21 | 21 | public: |
|
22 | 22 | /** |
|
23 | 23 | * Ctor for a unidimensional ArrayData |
|
24 | * @param nbColumns the number of values the ArrayData will hold | |
|
25 | */ | |
|
26 | template <int D = Dim, typename = std::enable_if_t<D == 1> > | |
|
27 | explicit ArrayData(int nbColumns) : m_Data{1, QVector<double>{}} | |
|
28 | { | |
|
29 | QWriteLocker locker{&m_Lock}; | |
|
30 | m_Data[0].resize(nbColumns); | |
|
31 | } | |
|
32 | ||
|
33 | /** | |
|
34 | * Ctor for a unidimensional ArrayData | |
|
35 | 24 | * @param data the data the ArrayData will hold |
|
36 | 25 | */ |
|
37 | 26 | template <int D = Dim, typename = std::enable_if_t<D == 1> > |
|
38 | 27 | explicit ArrayData(QVector<double> data) : m_Data{1, QVector<double>{}} |
|
39 | 28 | { |
|
40 | QWriteLocker locker{&m_Lock}; | |
|
41 | 29 | m_Data[0] = std::move(data); |
|
42 | 30 | } |
|
43 | 31 | |
@@ -45,7 +33,6 public: | |||
|
45 | 33 | explicit ArrayData(const ArrayData &other) |
|
46 | 34 | { |
|
47 | 35 | QReadLocker otherLocker{&other.m_Lock}; |
|
48 | QWriteLocker locker{&m_Lock}; | |
|
49 | 36 | m_Data = other.m_Data; |
|
50 | 37 | } |
|
51 | 38 |
General Comments 0
You need to be logged in to leave comments.
Login now