Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
94fffe4d
Commit
94fffe4d
authored
7 years ago
by
Zhou, Wenduo
Browse files
Options
Downloads
Patches
Plain Diff
Refs #19324. Fixed windows warning.
parent
9293d76a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/Algorithms/src/AddSampleLog.cpp
+4
-6
4 additions, 6 deletions
Framework/Algorithms/src/AddSampleLog.cpp
with
4 additions
and
6 deletions
Framework/Algorithms/src/AddSampleLog.cpp
+
4
−
6
View file @
94fffe4d
...
@@ -163,9 +163,8 @@ void AddSampleLog::addSingleValueProperty(Run &theRun,
...
@@ -163,9 +163,8 @@ void AddSampleLog::addSingleValueProperty(Run &theRun,
if
(
value_is_int
)
{
if
(
value_is_int
)
{
// convert to integer
// convert to integer
int
intVal
;
int
intVal
;
bool
convert_to_int
=
int
convert_to_int
=
Strings
::
convert
(
propValue
,
intVal
);
static_cast
<
bool
>
(
Strings
::
convert
(
propValue
,
intVal
));
if
(
convert_to_int
==
0
)
{
if
(
!
convert_to_int
)
{
// spit out error message and set to default value
// spit out error message and set to default value
g_log
.
error
()
<<
"Error interpreting string '"
<<
propValue
g_log
.
error
()
<<
"Error interpreting string '"
<<
propValue
<<
"' as NumberType Int."
;
<<
"' as NumberType Int."
;
...
@@ -176,9 +175,8 @@ void AddSampleLog::addSingleValueProperty(Run &theRun,
...
@@ -176,9 +175,8 @@ void AddSampleLog::addSingleValueProperty(Run &theRun,
}
else
{
}
else
{
// convert to double
// convert to double
double
dblVal
;
double
dblVal
;
bool
convert_to_dbl
=
int
convert_to_dbl
=
Strings
::
convert
(
propValue
,
dblVal
);
static_cast
<
bool
>
(
Strings
::
convert
(
propValue
,
dblVal
));
if
(
convert_to_dbl
==
0
)
{
if
(
!
convert_to_dbl
)
{
g_log
.
error
()
<<
"Error interpreting string '"
<<
propValue
g_log
.
error
()
<<
"Error interpreting string '"
<<
propValue
<<
"' as NumberType Double."
;
<<
"' as NumberType Double."
;
throw
std
::
runtime_error
(
"Invalid double input."
);
throw
std
::
runtime_error
(
"Invalid double input."
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment