Skip to content

Commit

Permalink
Refs #6098. Quieting gcc 4.7 compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Nov 7, 2012
1 parent f44bceb commit 2a40fc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Code/Mantid/Framework/API/src/ExperimentInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,8 @@ namespace API
// create parameter's value as a sum of all tokens with index 3 or larger
// this allow a parameter's value to contain ";"
std::string paramValue = tokens[3];
for (int i = 4; i < tokens.count(); i++ )
int size = static_cast<int>(tokens.count());
for (int i = 4; i < size; i++ )
paramValue += ";" + tokens[4];
pmap.add(tokens[1], comp, tokens[2], paramValue);
}
Expand Down
6 changes: 4 additions & 2 deletions Code/Mantid/Framework/PythonAPI/src/MantidVecHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ namespace Mantid
{
npy_intp dims[1] = { static_cast<int>(values.size()) };
PyArrayObject * ndarray =
(PyArrayObject*)PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE,(void*)&(values[0]));
(PyArrayObject*)(PyArray_SimpleNewFromData(1, dims, NPY_DOUBLE,
static_cast<void*>(const_cast<double*>(&(values[0])))));
if( readonly )
{
ndarray->flags &= ~NPY_WRITEABLE;
Expand Down Expand Up @@ -122,7 +123,8 @@ namespace Mantid
{
npy_intp dims[2] = {static_cast<int>(values.size().first),static_cast<int>(values.size().second)} ;
PyArrayObject * ndarray =
(PyArrayObject*)PyArray_SimpleNewFromData(2, dims, NPY_DOUBLE,(void*)&(values[0][0]));
(PyArrayObject*)PyArray_SimpleNewFromData(2, dims, NPY_DOUBLE,
static_cast<void*>(const_cast<double*>(&(values[0][0]))));
if( readonly )
{
ndarray->flags &= ~NPY_WRITEABLE;
Expand Down

0 comments on commit 2a40fc4

Please sign in to comment.