Address clang tidy complaints

Update Ghoul repository
Update SGCT repository
This commit is contained in:
Alexander Bock
2018-11-30 15:34:09 -05:00
parent 752750bee8
commit c7a96a6b59
121 changed files with 626 additions and 670 deletions
@@ -96,7 +96,7 @@ public:
* Reads a single SPECK file and returns a vector with <code>nRenderValues</code>
* per star. Reads data in pre-defined order based on AMNH's star data files.
*/
std::vector<float> readSpeckFile(std::string filePath, int& nRenderValues);
std::vector<float> readSpeckFile(const std::string& filePath, int& nRenderValues);
private:
std::unique_ptr<CCfits::FITS> _infile;
@@ -52,7 +52,7 @@ FitsFileReader::~FitsFileReader() {
}
bool FitsFileReader::isPrimaryHDU() {
return _infile->extension().size() == 0;
return _infile->extension().empty();
}
template <typename T>
@@ -507,9 +507,10 @@ std::vector<float> FitsFileReader::readFitsFile(std::string filePath, int& nValu
return fullData;
}
std::vector<float> FitsFileReader::readSpeckFile(std::string filePath, int& nRenderValues)
std::vector<float> FitsFileReader::readSpeckFile(const std::string& filePath,
int& nRenderValues)
{
auto fullData = std::vector<float>();
std::vector<float> fullData;
std::ifstream fileStream(filePath);
@@ -525,7 +526,7 @@ std::vector<float> FitsFileReader::readSpeckFile(std::string filePath, int& nRen
// The beginning of the speck file has a header that either contains comments
// (signaled by a preceding '#') or information about the structure of the file
// (signaled by the keywords 'datavar', 'texturevar', 'texture' and 'maxcomment')
std::string line = "";
std::string line;
while (true) {
std::streampos position = fileStream.tellg();
std::getline(fileStream, line);
@@ -591,8 +592,8 @@ std::vector<float> FitsFileReader::readSpeckFile(std::string filePath, int& nRen
// Check if star is a nullArray.
bool nullArray = true;
for (size_t i = 0; i < readValues.size(); ++i) {
if (readValues[i] != 0.0) {
for (float f : readValues) {
if (f != 0.0) {
nullArray = false;
break;
}