Skip to content

Commit

Permalink
refs #6053 Fixing Unix warnigs
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Dec 4, 2012
1 parent fda6abf commit 0d01138
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace MDAlgorithms
std::streamoff parse_sqw_detpar(std::ifstream &stream,std::streamoff start_location); //Legacy - candidate for removal
///Block 4: Data: parse positions of the data fields
void parse_data_locations(std::ifstream &stream,std::streamoff data_start,
std::vector<size_t> &nBins,size_t &nDims,uint64_t &nDataPoints); //Legacy - candidate for removal
std::vector<size_t> &nBins,uint64_t &nDataPoints); //Legacy - candidate for removal

};
}
Expand Down
15 changes: 8 additions & 7 deletions Code/Mantid/Framework/MDAlgorithms/src/LoadSQW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ namespace Mantid
ws->addEvent(MDEvent<4>(
cast<float>(Buffer,current_pix + column_size_7), // Signal
error*error, // Error sq
(int32_t)cast<float>(Buffer,current_pix + column_size_6), // run Index
(uint16_t)cast<float>(Buffer,current_pix + column_size_4), // Detector Id
centers));
int32_t(cast<float>(Buffer,current_pix + column_size_6)), // run Index
uint16_t(cast<float>(Buffer,current_pix + column_size_4)), // Detector Id
centers));
}


Expand Down Expand Up @@ -751,7 +751,7 @@ namespace Mantid
data_buffer.resize(3*4);

m_fileStream.read(&data_buffer[0],2*4);
this->m_nDims = *((uint32_t*)(&data_buffer[4]));
this->m_nDims = cast<uint32_t>(data_buffer);

m_dataPositions.parse_sqw_main_header(m_fileStream);

Expand All @@ -766,7 +766,7 @@ namespace Mantid
// get detectors
m_dataPositions.data_start = m_dataPositions.parse_sqw_detpar(m_fileStream,m_dataPositions.detectors_start);
// calculate all other data fields locations;
m_dataPositions.parse_data_locations(m_fileStream,m_dataPositions.data_start,m_nBins,m_nDims,m_nDataPoints);
m_dataPositions.parse_data_locations(m_fileStream,m_dataPositions.data_start,m_nBins,m_nDataPoints);
}


Expand Down Expand Up @@ -926,7 +926,7 @@ namespace LoadSQWHelper
@returns: nDataPoints-- number of pixels (MD events) contributing to the image
*/
void dataPositions::parse_data_locations(std::ifstream &dataStream,std::streamoff data_start,
std::vector<size_t> &nBins,size_t &nDims,uint64_t &nDataPoints)
std::vector<size_t> &nBins,uint64_t &nDataPoints)
{
std::vector<char> data_buffer(12);

Expand Down Expand Up @@ -978,7 +978,8 @@ namespace LoadSQWHelper
dataStream.seekg(3*niax*4,std::ios_base::cur);

}
if(npax!=0){
if(npax!=0)
{
nBins.resize(npax);

// skip projection axis
Expand Down

0 comments on commit 0d01138

Please sign in to comment.