Skip to content

Commit

Permalink
Refs #8958 Sorted complier warnings
Browse files Browse the repository at this point in the history
there were a couple of "comparison between signed and unsigned int" warnings.

I also changed a couple of autos to const references of thier actual types on martyn's suggestion.
  • Loading branch information
keithnbrown committed Feb 13, 2014
1 parent 775e143 commit 197fc5c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Code/Mantid/Framework/DataHandling/src/SaveANSTO.cpp
Expand Up @@ -70,21 +70,21 @@ namespace Mantid
m_ws = getProperty("InputWorkspace");
g_log.information("FILENAME: " + filename);
auto title ='#'+ m_ws->getTitle();
auto x1 = m_ws->readX(0);
const std::vector<double> & x1 = m_ws->readX(0);
const size_t xlength = x1.size() - 1;
std::vector<double> X1;
X1.resize(xlength, 0);
for (int i = 0; i < xlength; ++i)
for (size_t i = 0; i < xlength; ++i)
{
X1[i]=(x1[i]+x1[i+1])/2.0;
}
auto y1 = m_ws->readY(0);
auto e1 = m_ws->readE(0);
const std::vector<double> & y1 = m_ws->readY(0);
const std::vector<double> & e1 = m_ws->readE(0);
char sep = '\t';
double qres = (X1[1]-X1[0])/X1[1];
g_log.information("Constant dq/q from file: " + boost::lexical_cast<std::string>(qres));
file << std::scientific;
for (int i = 0; i < xlength; ++i)
for (size_t i = 0; i < xlength; ++i)
{
double dq = X1[i]*qres;
file << X1[i] << sep << y1[i] << sep << e1[i] << sep << dq << std::endl;
Expand Down

0 comments on commit 197fc5c

Please sign in to comment.