Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
16793a5f
Commit
16793a5f
authored
Jul 26, 2021
by
Peterson, Peter
Browse files
Fixing cppcheck warnings
parent
029a7ea6
Changes
24
Hide whitespace changes
Inline
Side-by-side
Framework/Algorithms/src/CombineDiffCal.cpp
View file @
16793a5f
...
...
@@ -114,8 +114,6 @@ std::shared_ptr<Mantid::API::TableRow> binarySearchForRow(API::ITableWorkspace_s
size_t
currentPosition
=
start
+
((
end
-
start
)
/
2
);
Mantid
::
API
::
TableRow
currentRow
=
ws
->
getRow
(
currentPosition
);
currentRow
=
ws
->
getRow
(
currentPosition
);
if
(
currentRow
.
Int
(
0
)
>
detid
)
{
end
=
currentPosition
-
1
;
}
else
if
(
currentRow
.
Int
(
0
)
<
detid
)
{
...
...
Framework/Beamline/inc/MantidBeamline/ComponentInfo.h
View file @
16793a5f
...
...
@@ -57,8 +57,8 @@ private:
std
::
vector
<
bool
>
buildMergeIndices
(
const
ComponentInfo
&
other
)
const
;
void
checkSizes
(
const
ComponentInfo
&
other
)
const
;
void
initIndices
();
void
checkIdenticalIntervals
(
const
ComponentInfo
&
other
,
const
std
::
pair
<
size_t
,
size_t
>
indexOther
,
const
std
::
pair
<
size_t
,
size_t
>
indexThis
)
const
;
void
checkIdenticalIntervals
(
const
ComponentInfo
&
other
,
const
std
::
pair
<
size_t
,
size_t
>
&
indexOther
,
const
std
::
pair
<
size_t
,
size_t
>
&
indexThis
)
const
;
void
checkSpecialIndices
(
size_t
componentIndex
)
const
;
size_t
nonDetectorSize
()
const
;
/// Copy constructor is private because of the way DetectorInfo stored
...
...
@@ -101,9 +101,9 @@ public:
Eigen
::
Vector3d
relativePosition
(
const
size_t
componentIndex
)
const
;
Eigen
::
Quaterniond
relativeRotation
(
const
size_t
componentIndex
)
const
;
void
setPosition
(
const
size_t
componentIndex
,
const
Eigen
::
Vector3d
&
newPosition
);
void
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Eigen
::
Vector3d
&
newPosition
);
void
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Eigen
::
Vector3d
&
newPosition
);
void
setRotation
(
const
size_t
componentIndex
,
const
Eigen
::
Quaterniond
&
newRotation
);
void
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Eigen
::
Quaterniond
&
newRotation
);
void
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Eigen
::
Quaterniond
&
newRotation
);
size_t
parent
(
const
size_t
componentIndex
)
const
;
bool
hasParent
(
const
size_t
componentIndex
)
const
;
...
...
Framework/Beamline/src/ComponentInfo.cpp
View file @
16793a5f
...
...
@@ -327,7 +327,7 @@ void ComponentInfo::setPosition(const size_t componentIndex, const Eigen::Vector
* @param index : Component, time index pair
* @param newPosition : Absolute position to set
*/
void
ComponentInfo
::
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Eigen
::
Vector3d
&
newPosition
)
{
void
ComponentInfo
::
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Eigen
::
Vector3d
&
newPosition
)
{
const
auto
componentIndex
=
index
.
first
;
checkSpecialIndices
(
componentIndex
);
...
...
@@ -371,7 +371,7 @@ void ComponentInfo::setRotation(const size_t componentIndex, const Eigen::Quater
* @param index : Component and time index pair
* @param newRotation : Absolute rotation to set
*/
void
ComponentInfo
::
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Eigen
::
Quaterniond
&
newRotation
)
{
void
ComponentInfo
::
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Eigen
::
Quaterniond
&
newRotation
)
{
const
auto
componentIndex
=
index
.
first
;
checkSpecialIndices
(
componentIndex
);
if
(
isDetector
(
componentIndex
))
...
...
@@ -659,8 +659,8 @@ void ComponentInfo::checkSizes(const ComponentInfo &other) const {
failMerge
(
"size mismatch"
);
}
void
ComponentInfo
::
checkIdenticalIntervals
(
const
ComponentInfo
&
other
,
const
std
::
pair
<
size_t
,
size_t
>
indexOther
,
const
std
::
pair
<
size_t
,
size_t
>
indexThis
)
const
{
void
ComponentInfo
::
checkIdenticalIntervals
(
const
ComponentInfo
&
other
,
const
std
::
pair
<
size_t
,
size_t
>
&
indexOther
,
const
std
::
pair
<
size_t
,
size_t
>
&
indexThis
)
const
{
if
(
this
->
position
(
indexThis
)
!=
other
.
position
(
indexOther
))
failMerge
(
"matching scan interval but positions differ"
);
if
(
this
->
rotation
(
indexThis
).
coeffs
()
!=
other
.
rotation
(
indexOther
).
coeffs
())
...
...
Framework/DataObjects/src/BasePeak.cpp
View file @
16793a5f
...
...
@@ -324,6 +324,7 @@ BasePeak &BasePeak::operator=(const BasePeak &other) {
m_InverseGoniometerMatrix
=
other
.
m_InverseGoniometerMatrix
;
m_runNumber
=
other
.
m_runNumber
;
m_monitorCount
=
other
.
m_monitorCount
;
m_peakNumber
=
other
.
m_peakNumber
;
m_intHKL
=
other
.
m_intHKL
;
m_intMNP
=
other
.
m_intMNP
;
m_peakShape
.
reset
(
other
.
m_peakShape
->
clone
());
...
...
Framework/DataObjects/src/EventList.cpp
View file @
16793a5f
...
...
@@ -307,7 +307,8 @@ void EventList::createFromHistogram(const ISpectrum *inSpec, bool GenerateZeros,
* @return reference to this
* */
EventList
&
EventList
::
operator
=
(
const
EventList
&
rhs
)
{
// Note that we are NOT copying the MRU pointer.
// Note that we are NOT copying the MRU pointer
// the EventWorkspace that posseses the EventList has already configured the mru
IEventList
::
operator
=
(
rhs
);
m_histogram
=
rhs
.
m_histogram
;
events
=
rhs
.
events
;
...
...
@@ -945,13 +946,14 @@ void EventList::setSortOrder(const EventSortType order) const { this->order = or
// --------------------------------------------------------------------------
/** Sort events by TOF in one thread */
void
EventList
::
sortTof
()
const
{
if
(
this
->
order
==
TOF_SORT
)
return
;
// nothing to do
// nothing to do
if
(
this
->
order
==
TOF_SORT
)
// cppcheck-suppress identicalConditionAfterEarlyExit
return
;
// Avoid sorting from multiple threads
std
::
lock_guard
<
std
::
mutex
>
_lock
(
m_sortMutex
);
// If the list was sorted while waiting for the lock, return.
if
(
this
->
order
==
TOF_SORT
)
if
(
this
->
order
==
TOF_SORT
)
// cppcheck-suppress identicalConditionAfterEarlyExit
return
;
switch
(
eventType
)
{
...
...
@@ -1011,13 +1013,13 @@ void EventList::sortTimeAtSample(const double &tofFactor, const double &tofShift
// --------------------------------------------------------------------------
/** Sort events by Frame */
void
EventList
::
sortPulseTime
()
const
{
if
(
this
->
order
==
PULSETIME_SORT
)
return
;
// nothing to do
if
(
this
->
order
==
PULSETIME_SORT
)
// cppcheck-suppress identicalConditionAfterEarlyExit
return
;
// nothing to do
// Avoid sorting from multiple threads
std
::
lock_guard
<
std
::
mutex
>
_lock
(
m_sortMutex
);
// If the list was sorted while waiting for the lock, return.
if
(
this
->
order
==
PULSETIME_SORT
)
if
(
this
->
order
==
PULSETIME_SORT
)
// cppcheck-suppress identicalConditionAfterEarlyExit
return
;
// Perform sort.
...
...
@@ -1041,13 +1043,13 @@ void EventList::sortPulseTime() const {
* (the absolute time)
*/
void
EventList
::
sortPulseTimeTOF
()
const
{
if
(
this
->
order
==
PULSETIMETOF_SORT
)
return
;
// already ordered
.
if
(
this
->
order
==
PULSETIMETOF_SORT
)
// cppcheck-suppress identicalConditionAfterEarlyExit
return
;
// already ordered
// Avoid sorting from multiple threads
std
::
lock_guard
<
std
::
mutex
>
_lock
(
m_sortMutex
);
// If the list was sorted while waiting for the lock, return.
if
(
this
->
order
==
PULSETIMETOF_SORT
)
if
(
this
->
order
==
PULSETIMETOF_SORT
)
// cppcheck-suppress identicalConditionAfterEarlyExit
return
;
switch
(
eventType
)
{
...
...
Framework/Geometry/inc/MantidGeometry/Crystal/IndexingUtils.h
View file @
16793a5f
...
...
@@ -174,7 +174,7 @@ public:
/// Make list of the circle of direction vectors that form a fixed angle
/// with the specified axis
static
std
::
vector
<
Kernel
::
V3D
>
MakeCircleDirections
(
int
n_steps
,
const
Kernel
::
V3D
axis
,
double
angle_degrees
);
static
std
::
vector
<
Kernel
::
V3D
>
MakeCircleDirections
(
int
n_steps
,
const
Kernel
::
V3D
&
axis
,
double
angle_degrees
);
/// Choose the direction in a list of directions, that is most nearly
/// perpendicular to planes with the specified spacing in reciprocal space.
...
...
Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroupFactory.h
View file @
16793a5f
...
...
@@ -194,7 +194,7 @@ public:
std
::
string
transformedSymbol
=
getTransformedSymbolOrthorhombic
(
hmSymbol
,
transformation
);
bool
symbolExists
=
std
::
find
(
transformedSpaceGroupSymbols
.
cbegin
(),
transformedSpaceGroupSymbols
.
cend
(),
transformedSymbol
)
!=
transformedSpaceGroupSymbols
.
end
();
transformedSymbol
)
!=
transformedSpaceGroupSymbols
.
c
end
();
if
(
transformedSymbol
!=
hmSymbol
&&
!
symbolExists
)
{
subscribeUsingGenerator
<
TransformationSpaceGroupGenerator
>
(
...
...
Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfo.h
View file @
16793a5f
...
...
@@ -86,15 +86,15 @@ public:
bool
uniqueName
(
const
std
::
string
&
name
)
const
;
bool
isDetector
(
const
size_t
componentIndex
)
const
;
Kernel
::
V3D
position
(
const
size_t
componentIndex
)
const
;
Kernel
::
V3D
position
(
const
std
::
pair
<
size_t
,
size_t
>
index
)
const
;
Kernel
::
V3D
position
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
)
const
;
Kernel
::
Quat
rotation
(
const
size_t
componentIndex
)
const
;
Kernel
::
Quat
rotation
(
const
std
::
pair
<
size_t
,
size_t
>
index
)
const
;
Kernel
::
Quat
rotation
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
)
const
;
Kernel
::
V3D
relativePosition
(
const
size_t
componentIndex
)
const
;
Kernel
::
Quat
relativeRotation
(
const
size_t
componentIndex
)
const
;
void
setPosition
(
size_t
componentIndex
,
const
Kernel
::
V3D
&
newPosition
);
void
setRotation
(
size_t
componentIndex
,
const
Kernel
::
Quat
&
newRotation
);
void
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Kernel
::
V3D
&
newPosition
);
void
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Kernel
::
Quat
&
newRotation
);
void
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Kernel
::
V3D
&
newPosition
);
void
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Kernel
::
Quat
&
newRotation
);
size_t
parent
(
const
size_t
componentIndex
)
const
;
bool
hasParent
(
const
size_t
componentIndex
)
const
;
bool
hasDetectorInfo
()
const
;
...
...
Framework/Geometry/inc/MantidGeometry/Instrument/Container.h
View file @
16793a5f
...
...
@@ -28,7 +28,7 @@ public:
Container
();
Container
(
IObject_sptr
shape
);
Container
(
const
Container
&
container
);
Container
(
std
::
string
xml
);
Container
(
const
std
::
string
&
xml
);
bool
hasCustomizableSampleShape
()
const
;
bool
hasFixedSampleShape
()
const
;
...
...
Framework/Geometry/inc/MantidGeometry/Instrument/Goniometer.h
View file @
16793a5f
...
...
@@ -42,7 +42,8 @@ struct GoniometerAxis {
int
sense
;
/// Rotation sense (1 for CCW, -1 for CW)
int
angleunit
;
/// angle units are angDegrees or angRadians (see AngleUnits.h)
/// Constructor
GoniometerAxis
(
std
::
string
initname
,
Kernel
::
V3D
initrotationaxis
,
double
initangle
,
int
initsense
,
int
initangleunit
)
GoniometerAxis
(
std
::
string
initname
,
const
Kernel
::
V3D
&
initrotationaxis
,
double
initangle
,
int
initsense
,
int
initangleunit
)
:
name
(
std
::
move
(
initname
)),
rotationaxis
(
initrotationaxis
),
angle
(
initangle
),
sense
(
initsense
),
angleunit
(
initangleunit
)
{}
GoniometerAxis
()
:
name
(
""
),
rotationaxis
(),
angle
(
0.
),
sense
(
0
),
angleunit
(
0
)
{}
...
...
Framework/Geometry/src/Crystal/HKLGenerator.cpp
View file @
16793a5f
...
...
@@ -23,8 +23,7 @@ HKLGenerator::HKLGenerator(const Kernel::V3D &hklMinMax)
m_end
(
getEndIterator
())
{}
/// Constructs a generator that creates all indices from -h,-k,-l to h,k,l.
HKLGenerator
::
HKLGenerator
(
int
hMinMax
,
int
kMinMax
,
int
lMinMax
)
{
m_hklMax
=
V3D
(
hMinMax
,
kMinMax
,
lMinMax
);
HKLGenerator
::
HKLGenerator
(
int
hMinMax
,
int
kMinMax
,
int
lMinMax
)
:
m_hklMax
(
hMinMax
,
kMinMax
,
lMinMax
)
{
m_hklMin
=
m_hklMax
*
-
1
;
m_size
=
getSize
(
m_hklMin
,
m_hklMax
);
...
...
@@ -34,8 +33,8 @@ HKLGenerator::HKLGenerator(int hMinMax, int kMinMax, int lMinMax) {
/// Constructs a generator that creates all indices for the given cell up to
/// dMin.
HKLGenerator
::
HKLGenerator
(
const
UnitCell
&
unitCell
,
double
dMin
)
{
m_hklMax
=
V3D
(
floor
(
unitCell
.
a
()
/
dMin
),
floor
(
unitCell
.
b
()
/
dMin
),
floor
(
unitCell
.
c
()
/
dMin
))
;
HKLGenerator
::
HKLGenerator
(
const
UnitCell
&
unitCell
,
double
dMin
)
:
m_hklMax
(
floor
(
unitCell
.
a
()
/
dMin
),
floor
(
unitCell
.
b
()
/
dMin
),
floor
(
unitCell
.
c
()
/
dMin
))
{
m_hklMin
=
m_hklMax
*
-
1
;
m_size
=
getSize
(
m_hklMin
,
m_hklMax
);
...
...
Framework/Geometry/src/Crystal/IndexingUtils.cpp
View file @
16793a5f
...
...
@@ -2642,7 +2642,7 @@ std::vector<V3D> IndexingUtils::MakeHemisphereDirections(int n_steps) {
@throws std::invalid_argument exception if the number of steps is <= 0, or
if the axix length is 0.
*/
std
::
vector
<
V3D
>
IndexingUtils
::
MakeCircleDirections
(
int
n_steps
,
const
V3D
axis
,
double
angle_degrees
)
{
std
::
vector
<
V3D
>
IndexingUtils
::
MakeCircleDirections
(
int
n_steps
,
const
Kernel
::
V3D
&
axis
,
double
angle_degrees
)
{
if
(
n_steps
<=
0
)
{
throw
std
::
invalid_argument
(
"MakeCircleDirections(): n_steps must be greater than 0"
);
}
...
...
Framework/Geometry/src/Instrument/ComponentInfo.cpp
View file @
16793a5f
...
...
@@ -146,7 +146,7 @@ Kernel::V3D ComponentInfo::position(const size_t componentIndex) const {
return
Kernel
::
toV3D
(
m_componentInfo
->
position
(
componentIndex
));
}
Kernel
::
V3D
ComponentInfo
::
position
(
const
std
::
pair
<
size_t
,
size_t
>
index
)
const
{
Kernel
::
V3D
ComponentInfo
::
position
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
)
const
{
return
Kernel
::
toV3D
(
m_componentInfo
->
position
(
index
));
}
...
...
@@ -154,7 +154,7 @@ Kernel::Quat ComponentInfo::rotation(const size_t componentIndex) const {
return
Kernel
::
toQuat
(
m_componentInfo
->
rotation
(
componentIndex
));
}
Kernel
::
Quat
ComponentInfo
::
rotation
(
const
std
::
pair
<
size_t
,
size_t
>
index
)
const
{
Kernel
::
Quat
ComponentInfo
::
rotation
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
)
const
{
return
Kernel
::
toQuat
(
m_componentInfo
->
rotation
(
index
));
}
...
...
@@ -166,11 +166,11 @@ Kernel::Quat ComponentInfo::relativeRotation(const size_t componentIndex) const
return
Kernel
::
toQuat
(
m_componentInfo
->
relativeRotation
(
componentIndex
));
}
void
ComponentInfo
::
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Kernel
::
V3D
&
newPosition
)
{
void
ComponentInfo
::
setPosition
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Kernel
::
V3D
&
newPosition
)
{
m_componentInfo
->
setPosition
(
index
,
Kernel
::
toVector3d
(
newPosition
));
}
void
ComponentInfo
::
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
index
,
const
Kernel
::
Quat
&
newRotation
)
{
void
ComponentInfo
::
setRotation
(
const
std
::
pair
<
size_t
,
size_t
>
&
index
,
const
Kernel
::
Quat
&
newRotation
)
{
m_componentInfo
->
setRotation
(
index
,
Kernel
::
toQuaterniond
(
newRotation
));
}
...
...
Framework/Geometry/src/Instrument/Container.cpp
View file @
16793a5f
...
...
@@ -65,7 +65,7 @@ Container::Container(const Container &container)
* Construct a container providing an XML definition shape
* @param xml Definition of the shape in xml
*/
Container
::
Container
(
std
::
string
xml
)
:
m_shape
(
std
::
make_shared
<
CSGObject
>
(
xml
))
{}
Container
::
Container
(
const
std
::
string
&
xml
)
:
m_shape
(
std
::
make_shared
<
CSGObject
>
(
xml
))
{}
/**
* @return True if the can contains a definition of the sample shape
...
...
Framework/Indexing/inc/MantidIndexing/IndexInfo.h
View file @
16793a5f
...
...
@@ -56,7 +56,7 @@ class SpectrumNumberTranslator;
*/
class
MANTID_INDEXING_DLL
IndexInfo
{
public:
explicit
IndexInfo
(
const
size_t
globalSize
,
const
Parallel
::
StorageMode
storageMode
=
Parallel
::
StorageMode
::
Cloned
);
explicit
IndexInfo
(
const
size_t
globalSize
,
const
Parallel
::
StorageMode
&
storageMode
=
Parallel
::
StorageMode
::
Cloned
);
IndexInfo
(
const
size_t
globalSize
,
const
Parallel
::
StorageMode
storageMode
,
const
Parallel
::
Communicator
&
communicator
);
explicit
IndexInfo
(
std
::
vector
<
SpectrumNumber
>
spectrumNumbers
,
...
...
Framework/Indexing/src/IndexInfo.cpp
View file @
16793a5f
...
...
@@ -22,7 +22,7 @@ namespace Indexing {
/// Construct a default IndexInfo, with contiguous spectrum numbers starting at
/// 1 and no spectrum definitions.
IndexInfo
::
IndexInfo
(
const
size_t
globalSize
,
const
Parallel
::
StorageMode
storageMode
)
IndexInfo
::
IndexInfo
(
const
size_t
globalSize
,
const
Parallel
::
StorageMode
&
storageMode
)
:
IndexInfo
(
globalSize
,
storageMode
,
Parallel
::
Communicator
{})
{}
/// Construct a default IndexInfo, with contiguous spectrum numbers starting at
...
...
Framework/Kernel/inc/MantidKernel/ListValidator.h
View file @
16793a5f
...
...
@@ -42,12 +42,12 @@ public:
const
bool
allowMultiSelection
=
false
)
:
TypedValidator
<
TYPE
>
(),
m_allowedValues
(
values
.
begin
(),
values
.
end
()),
m_aliases
(
aliases
.
begin
(),
aliases
.
end
()),
m_allowMultiSelection
(
allowMultiSelection
)
{
if
(
m_allowMultiSelection
)
{
throw
Kernel
::
Exception
::
NotImplementedError
(
"The List Validator does not support multi selection yet"
);
}
for
(
auto
aliasIt
=
m_aliases
.
begin
();
aliasIt
!=
m_aliases
.
end
();
++
aliasIt
)
{
if
(
values
.
end
()
==
std
::
find
(
values
.
begin
(),
values
.
end
(),
boost
::
lexical_cast
<
TYPE
>
(
aliasIt
->
second
)))
{
throw
std
::
invalid_argument
(
"Alias "
+
aliasIt
->
first
+
" refers to invalid value "
+
aliasIt
->
second
);
if
(
m_allowMultiSelection
)
{
throw
Kernel
::
Exception
::
NotImplementedError
(
"The List Validator does not support multi selection yet"
);
}
}
}
}
...
...
Framework/Kernel/inc/MantidKernel/Logger.h
View file @
16793a5f
...
...
@@ -101,10 +101,10 @@ public:
std
::
ostream
&
debug
();
/// Log a message at a given priority
void
log
(
const
std
::
string
&
message
,
Logger
::
Priority
priority
);
void
log
(
const
std
::
string
&
message
,
const
Priority
&
priority
);
/// gets the correct log stream for a priority
std
::
ostream
&
getLogStream
(
Logger
::
Priority
priority
);
std
::
ostream
&
getLogStream
(
const
Priority
&
priority
);
/// Logs the given message at debug level, followed by the data in buffer.
void
dump
(
const
std
::
string
&
msg
,
const
void
*
buffer
,
std
::
size_t
length
);
...
...
Framework/Kernel/inc/MantidKernel/Property.h
View file @
16793a5f
...
...
@@ -203,7 +203,7 @@ public:
protected:
/// Constructor
Property
(
std
::
string
name
,
const
std
::
type_info
&
type
,
unsigned
int
direction
=
Direction
::
Input
);
Property
(
std
::
string
name
,
const
std
::
type_info
&
type
,
const
unsigned
int
&
direction
=
Direction
::
Input
);
/// Copy constructor
Property
(
const
Property
&
right
);
/// The name of the property
...
...
Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h
View file @
16793a5f
...
...
@@ -62,10 +62,7 @@ private:
TYPE
mvalue
;
public:
TimeValueUnit
(
const
Types
::
Core
::
DateAndTime
&
time
,
TYPE
value
)
{
mtime
=
time
;
mvalue
=
value
;
}
TimeValueUnit
(
const
Types
::
Core
::
DateAndTime
&
time
,
const
TYPE
&
value
)
:
mtime
(
time
),
mvalue
(
value
)
{}
~
TimeValueUnit
()
=
default
;
...
...
@@ -184,11 +181,11 @@ public:
std
::
vector
<
double
>
timesAsVectorSeconds
()
const
;
/// Add a value to the map using a DateAndTime object
void
addValue
(
const
Types
::
Core
::
DateAndTime
&
time
,
const
TYPE
value
);
void
addValue
(
const
Types
::
Core
::
DateAndTime
&
time
,
const
TYPE
&
value
);
/// Add a value to the map using a string time
void
addValue
(
const
std
::
string
&
time
,
const
TYPE
value
);
void
addValue
(
const
std
::
string
&
time
,
const
TYPE
&
value
);
/// Add a value to the map using a time_t
void
addValue
(
const
std
::
time_t
&
time
,
const
TYPE
value
);
void
addValue
(
const
std
::
time_t
&
time
,
const
TYPE
&
value
);
/// Adds vectors of values to the map. Should be much faster than repeated
/// calls to addValue.
void
addValues
(
const
std
::
vector
<
Types
::
Core
::
DateAndTime
>
&
times
,
const
std
::
vector
<
TYPE
>
&
values
);
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment