Skip to content

Commit

Permalink
ENH: Format all source codes according to clang formatting rules.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Aug 27, 2024
1 parent bba46c1 commit b9e7137
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 81 deletions.
2 changes: 1 addition & 1 deletion Source/EbsdLib/Core/EbsdSetGetMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
//-- Qt includes
#include <QtCore/QSharedPointer>
#include <string>
//#define RAW_PTR data
// #define RAW_PTR data
#endif

/**
Expand Down
29 changes: 11 additions & 18 deletions Source/EbsdLib/IO/HKL/CtfConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ const std::string LatticeConstants("LatticeConstants");
const std::string BravaisLattice("BravaisLattice");
} // namespace CtfFile


//-----------------------------------------------------------------------------
// https://github.com/oinanoanalysis/h5oina/blob/master/H5OINAFile.md#ebsd-data
//-----------------------------------------------------------------------------
Expand All @@ -202,8 +201,8 @@ namespace H5OINA

const std::string H5FileExt("h5oina");
const std::string Index("Index");
const std::string FormatVersion("Format Version"); // String 2.0 is the earliest that I seem to have
const std::string Manufacturer("Manufacturer"); // String
const std::string FormatVersion("Format Version"); // String 2.0 is the earliest that I seem to have
const std::string Manufacturer("Manufacturer"); // String
const std::string SoftwareVersion("Software Version"); // String

const std::string FormatVersion_2("2.0");
Expand Down Expand Up @@ -247,27 +246,21 @@ const std::string SpaceGroup("Space Group");
// Data: Format Version 2
const std::string EBSD("EBSD");
const std::string Data("Data");
const std::string BandContrast("Band Contrast"); // uint8
const std::string BandSlope("Band Slope"); // uint8
const std::string Bands("Bands"); // uint8
const std::string Error("Error"); // uint8
const std::string Euler("Euler"); // 3xFloat32
const std::string BandContrast("Band Contrast"); // uint8
const std::string BandSlope("Band Slope"); // uint8
const std::string Bands("Bands"); // uint8
const std::string Error("Error"); // uint8
const std::string Euler("Euler"); // 3xFloat32
const std::string MeanAngularDeviation("Mean Angular Deviation"); // Float
const std::string Phase("Phase"); // uint8
const std::string X("X"); // uint8
const std::string Y("Y"); // uint8

const std::string Phase("Phase"); // uint8
const std::string X("X"); // uint8
const std::string Y("Y"); // uint8

// Data Format Version 5

const std::string UnprocessedPatterns("Unprocessed Patterns");
const std::string ProcessedPatterns("Processed Patterns");






}
} // namespace H5OINA

} // namespace EbsdLib
8 changes: 4 additions & 4 deletions Source/EbsdLib/IO/HKL/CtfReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
#include "EbsdLib/Math/EbsdLibMath.h"
#include "EbsdLib/Utilities/EbsdStringUtils.hpp"

//#define PI_OVER_2f 90.0f
//#define THREE_PI_OVER_2f 270.0f
//#define TWO_PIf 360.0f
//#define ONE_PIf 180.0f
// #define PI_OVER_2f 90.0f
// #define THREE_PI_OVER_2f 270.0f
// #define TWO_PIf 360.0f
// #define ONE_PIf 180.0f

namespace
{
Expand Down
4 changes: 1 addition & 3 deletions Source/EbsdLib/IO/HKL/DataParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ class Int32Parser : public DataParser
Int32Parser& operator=(Int32Parser&&) = delete; // Move Assignment Not Implemented
};


// -----------------------------------------------------------------------------
class FloatParser : public DataParser
{
Expand Down Expand Up @@ -432,7 +431,7 @@ class FloatParser : public DataParser
FloatParser& operator=(FloatParser&&) = delete; // Move Assignment Not Implemented
};

template<typename T>
template <typename T>
class NumericParser : public DataParser
{
public:
Expand Down Expand Up @@ -534,4 +533,3 @@ class NumericParser : public DataParser
NumericParser& operator=(const NumericParser&) = delete; // Copy Assignment Not Implemented
NumericParser& operator=(NumericParser&&) = delete; // Move Assignment Not Implemented
};

21 changes: 10 additions & 11 deletions Source/EbsdLib/IO/HKL/H5OINAReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,31 +123,31 @@ void* H5OINAReader::getPointerByName(const std::string& featureName)
{
return m_BandSlope.data();
}
if(featureName == EbsdLib::H5OINA::Bands)
if(featureName == EbsdLib::H5OINA::Bands)
{
return m_Bands.data();
}
if(featureName == EbsdLib::H5OINA::Error)
if(featureName == EbsdLib::H5OINA::Error)
{
return m_Error.data();
}
if(featureName == EbsdLib::H5OINA::Euler)
if(featureName == EbsdLib::H5OINA::Euler)
{
return m_Euler.data();
}
if(featureName == EbsdLib::H5OINA::MeanAngularDeviation)
if(featureName == EbsdLib::H5OINA::MeanAngularDeviation)
{
return m_MeanAngularDeviation.data();
}
if(featureName == EbsdLib::H5OINA::Phase)
if(featureName == EbsdLib::H5OINA::Phase)
{
return m_Phase.data();
}
if(featureName == EbsdLib::H5OINA::X)
if(featureName == EbsdLib::H5OINA::X)
{
return m_X.data();
}
if(featureName == EbsdLib::H5OINA::Y)
if(featureName == EbsdLib::H5OINA::Y)
{
return m_Y.data();
}
Expand Down Expand Up @@ -202,19 +202,18 @@ EbsdLib::NumericTypes::Type H5OINAReader::getPointerType(const std::string& feat
return EbsdLib::NumericTypes::Type::UnknownNumType;
}

void H5OINAReader::setReadPatternData(bool value)
void H5OINAReader::setReadPatternData(bool value)
{
m_ReadPatternData = value;
}


uint16_t* H5OINAReader::getPatternData()
{
return nullptr;
}
void H5OINAReader::getPatternDims(std::array<int32_t,2 > dims)
void H5OINAReader::getPatternDims(std::array<int32_t, 2> dims)
{
;
;
}

// -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Source/EbsdLib/IO/HKL/H5OINAReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class EbsdLib_EXPORT H5OINAReader : public EbsdReader

void setReadPatternData(bool value);
uint16_t* getPatternData();
void getPatternDims(std::array<int32_t,2 > dims);
void getPatternDims(std::array<int32_t, 2> dims);

/**
* @brief Returns the pointer to the data for a given feature
Expand Down
48 changes: 24 additions & 24 deletions Source/EbsdLib/IO/TSL/AngConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,67 +170,67 @@ const std::string EDAX("EDAX");
// LAUE Symmetry Identifiers

// Old Style LAUE Symmetry Identifiers
#define CIs 1 // triclinic (S2, Ci) [-1] a!=b!=c a!=b!=g!=90
#define D2H 22 // orthrohombic (D2h) [mmm] a!=b!=c a=b=g=90
#define C4H 4 // tetragonal (C4h) [4/m] a=b!=c a=b=g=90
#define D4H 42 // ditetragonal (D4h) [4/mmm] a=b!=c a=b=g=90
#define C3I 3 // trigonal (S6, C3i) [-3] a=b=c a=b=g!=90
#define D3D 32 // ditrigonal (D3d) [-3m] a=b=c a=b=g!=90
#define C6H 6 // hexagonal (C6h) [6/m] a=b!=c a=b=90 g=120
#define D6H 62 // dihexagonal (D6h) [6/mmm] a=b!=c a=b=90 g=120
#define TH 23 // tetrahedral (Th) [m3] a=b=c a=b=g=90
#define OH 43 // cubic (Oh) [m3m] a=b=c a=b=g=90
#define C2H_c 2 // monoclinic c (C2h) [2/m] a!=b!=c a=b=90!=g
#define CIs 1 // triclinic (S2, Ci) [-1] a!=b!=c a!=b!=g!=90
#define D2H 22 // orthrohombic (D2h) [mmm] a!=b!=c a=b=g=90
#define C4H 4 // tetragonal (C4h) [4/m] a=b!=c a=b=g=90
#define D4H 42 // ditetragonal (D4h) [4/mmm] a=b!=c a=b=g=90
#define C3I 3 // trigonal (S6, C3i) [-3] a=b=c a=b=g!=90
#define D3D 32 // ditrigonal (D3d) [-3m] a=b=c a=b=g!=90
#define C6H 6 // hexagonal (C6h) [6/m] a=b!=c a=b=90 g=120
#define D6H 62 // dihexagonal (D6h) [6/mmm] a=b!=c a=b=90 g=120
#define TH 23 // tetrahedral (Th) [m3] a=b=c a=b=g=90
#define OH 43 // cubic (Oh) [m3m] a=b=c a=b=g=90
#define C2H_c 2 // monoclinic c (C2h) [2/m] a!=b!=c a=b=90!=g
#define C2H_b 20 // monoclinic b (C2h) [2/m] a!=b!=c a=g=90!=b
#define C2H_a 21 // monoclinic a (C2h) [2/m] a!=b!=c b=g=90!=a

// New Style Full Point Group Symmetry Identifiers
#define Sym_C1 100 // Triclinic (C1) [1]
#define Sym_S2 101 // Triclinic (S2, Ci) [-1]

#define Sym_D2 105 // Orthorhombic (D2) [222]
#define Sym_D2 105 // Orthorhombic (D2) [222]
#define Sym_C2v 106 // Orthorhombic (C2v) [mm2]
#define Sym_D2h 107 // Orthorhombic (D2h) [mmm]

#define Sym_C4 108 // Tetragonal (C4) [4]
#define Sym_S4 109 // Tetragonal (S4) [-4]
#define Sym_C4 108 // Tetragonal (C4) [4]
#define Sym_S4 109 // Tetragonal (S4) [-4]
#define Sym_C4h 110 // Tetragonal (C4h) [4/m]

#define Sym_D4 111 // Tetragonal (D4) [422]
#define Sym_D4 111 // Tetragonal (D4) [422]
#define Sym_C4v 112 // Tetragonal (C4v) [4mm]
#define Sym_D2d 113 // Tetragonal (D2d) [-42m]
#define Sym_D4h 114 // Tetragonal (D4h) [4/mmm]

#define Sym_C3 115 // Trigonal (C3) [3]
#define Sym_S6 116 // Trigonal (S6, C3i) [-3]

#define Sym_D3 117 // Trigonal (D3) [32]
#define Sym_D3 117 // Trigonal (D3) [32]
#define Sym_C3v 118 // Trigonal (C3v) [3m]
#define Sym_D3d 119 // Trigonal (D3d) [-3m]

#define Sym_C6 120 // Hexagonal (C6) [6]
#define Sym_C6 120 // Hexagonal (C6) [6]
#define Sym_C3h 121 // Hexagonal (C3h) [-6]
#define Sym_C6h 122 // Hexagonal (C6h) [6/m]

#define Sym_D6 123 // Hexagonal (D6) [622]
#define Sym_D6 123 // Hexagonal (D6) [622]
#define Sym_C6v 124 // Hexagonal (C6v) [6mm]
#define Sym_D3h 125 // Hexagonal (D3h) [-6m2]
#define Sym_D6h 126 // Hexagonal (D6h) [6/mmm]

#define Sym_T 127 // Cubic (T) [23]
#define Sym_T 127 // Cubic (T) [23]
#define Sym_Th 128 // Cubic (Th) [m-3]

#define Sym_O 129 // Cubic (O) [432]
#define Sym_O 129 // Cubic (O) [432]
#define Sym_Td 130 // Cubic (Td) [-43m]
#define Sym_Oh 131 // Cubic (Oh) [m3m]

#define Sym_C2_c 102 // Monoclinic c (C2)[2]
#define Sym_C2_c 102 // Monoclinic c (C2)[2]
#define Sym_C1h_c 103 // Monoclinic c (C1h, Cs) [m]
#define Sym_C2h_c 104 // Monoclinic c (C2h) [2/m]
#define Sym_C2_b 132 // Monoclinic b (C2)[2]
#define Sym_C2_b 132 // Monoclinic b (C2)[2]
#define Sym_C1h_b 133 // Monoclinic b (C1h, Cs) [m]
#define Sym_C2h_b 134 // Monoclinic b (C2h) [2/m]
#define Sym_C2_a 135 // Monoclinic a (C2)[2]
#define Sym_C2_a 135 // Monoclinic a (C2)[2]
#define Sym_C1h_a 136 // Monoclinic a (C1h, Cs) [m]
#define Sym_C2h_a 137 // Monoclinic a (C2h) [2/m]
namespace PhaseSymmetry
Expand Down Expand Up @@ -401,7 +401,7 @@ const std::string ColumnUnits(COLUMN_UNITS);
#define ANG_Y_STEP_LOWER "ystep"
#define ANG_NCOLS_ODD_LOWER "ncols_odd"
#define ANG_NCOLS_EVEN_LOWER "ncols_even"
//#define ANG_NCOLS_LOWER "ncols"
// #define ANG_NCOLS_LOWER "ncols"
#define ANG_NROWS_LOWER "nrows"

#define ANG_OPERATOR_LOWER "operator"
Expand Down
4 changes: 2 additions & 2 deletions Source/EbsdLib/IO/TSL/AngPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "EbsdLib/Core/EbsdSetGetMacros.h"
#include "EbsdLib/EbsdLib.h"

//#pragma pack(push, r1, 1) /* push current alignment to stack. set alignment to 1 byte boundary */
// #pragma pack(push, r1, 1) /* push current alignment to stack. set alignment to 1 byte boundary */
/*!
* @struct HKLFamily_t is used to write the HKL Family to an HDF5 file using a
* compound data type.
Expand Down Expand Up @@ -223,4 +223,4 @@ class EbsdLib_EXPORT AngPhase
// std::string m_Info = {};
};

//#pragma pack(pop, r1)
// #pragma pack(pop, r1)
2 changes: 1 addition & 1 deletion Source/EbsdLib/Utilities/ColorTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <algorithm>
#include <iostream>

//#include <QtCore/QJsonArray>
// #include <QtCore/QJsonArray>

using namespace EbsdLib;
// -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Source/EbsdLib/Utilities/EbsdStringUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ enum SplitType : uint8_t
AllowEmptyRightAnalyze
};

inline std::vector<std::string> specific_split(std::string_view str, std::vector<char>&& delimiters, SplitType splitType)
inline std::vector<std::string> specific_split(std::string_view str, std::vector<char>&& delimiters, SplitType splitType)
{
switch(splitType)
{
Expand Down
5 changes: 1 addition & 4 deletions Source/EbsdLib/Utilities/ModifiedLambertProjectionArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,7 @@ void ModifiedLambertProjectionArray::printTuple(std::stringstream& out, size_t i
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void ModifiedLambertProjectionArray::printComponent(std::stringstream& out, size_t i, int j) const
{
EBSD_METHOD_NOT_IMPLEMENTED()
}
void ModifiedLambertProjectionArray::printComponent(std::stringstream& out, size_t i, int j) const {EBSD_METHOD_NOT_IMPLEMENTED()}

#ifdef EbsdLib_ENABLE_HDF5
std::string getNameOfClass()
Expand Down
21 changes: 10 additions & 11 deletions Source/Test/H5OINAReaderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class H5OINAReaderTest
#endif
}

#define H5OINA_CHECK_POINTERS(name, def, type) \
#define H5OINA_CHECK_POINTERS(name, def, type) \
{ \
type* ptr0 = reader->get##name##Pointer(); \
void* ptr1 = reader->getPointerByName(def); \
void* ptr1 = reader->getPointerByName(def); \
DREAM3D_REQUIRED(ptr0, ==, ptr1) \
}

Expand All @@ -52,15 +52,14 @@ class H5OINAReaderTest
DREAM3D_REQUIRED(err, ==, 0)

H5OINA_CHECK_POINTERS(BandContrast, EbsdLib::H5OINA::BandContrast, uint8_t)
H5OINA_CHECK_POINTERS(BandSlope, EbsdLib::H5OINA::BandSlope,uint8_t)
H5OINA_CHECK_POINTERS(Bands, EbsdLib::H5OINA::Bands,uint8_t)
H5OINA_CHECK_POINTERS(Error, EbsdLib::H5OINA::Error,uint8_t)
H5OINA_CHECK_POINTERS(Euler, EbsdLib::H5OINA::Euler,float)
H5OINA_CHECK_POINTERS(MeanAngularDeviation, EbsdLib::H5OINA::MeanAngularDeviation,float)
H5OINA_CHECK_POINTERS(Phase, EbsdLib::H5OINA::Phase,uint8_t)
H5OINA_CHECK_POINTERS(X, EbsdLib::H5OINA::X,float)
H5OINA_CHECK_POINTERS(Y, EbsdLib::H5OINA::Y,float)

H5OINA_CHECK_POINTERS(BandSlope, EbsdLib::H5OINA::BandSlope, uint8_t)
H5OINA_CHECK_POINTERS(Bands, EbsdLib::H5OINA::Bands, uint8_t)
H5OINA_CHECK_POINTERS(Error, EbsdLib::H5OINA::Error, uint8_t)
H5OINA_CHECK_POINTERS(Euler, EbsdLib::H5OINA::Euler, float)
H5OINA_CHECK_POINTERS(MeanAngularDeviation, EbsdLib::H5OINA::MeanAngularDeviation, float)
H5OINA_CHECK_POINTERS(Phase, EbsdLib::H5OINA::Phase, uint8_t)
H5OINA_CHECK_POINTERS(X, EbsdLib::H5OINA::X, float)
H5OINA_CHECK_POINTERS(Y, EbsdLib::H5OINA::Y, float)
}

// -----------------------------------------------------------------------------
Expand Down

0 comments on commit b9e7137

Please sign in to comment.