Skip to content

Commit

Permalink
import one more tiny fix for v2.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tkittel committed Sep 10, 2021
1 parent 9cfc2cd commit e40c670
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ v2.7.3 2021-09-09
commulIntegral utility functions
* Add new internal IofQHelper utility class which can be used to
implement elastic physics described via an I(Q) curve
* Fix some obscure -Wshadow warnings on some rare platforms when some
local variable named s or m clashes with global variables of the same
name from Geant4.

v2.7.2 2021-07-08
* Various compilation fixes, affecting only users of Geant4-hooks with
Expand Down
4 changes: 2 additions & 2 deletions ncrystal_core/include/NCrystal/NCMatCfg.hh
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ namespace NCrystal {
inline MatInfoCfg::MatInfoCfg(const MatCfg& cfg) : m_cfg(cfg) {}
inline MatInfoCfg::MatInfoCfg(MatCfg&& cfg) : m_cfg(std::move(cfg)) {}
inline bool MatInfoCfg::isThinned() const { return m_cfg.isThinned(); }
inline std::ostream& operator<< (std::ostream& s, const MatCfg& cfg) { cfg.dump(s,false); return s; }
inline std::ostream& operator<< (std::ostream& s, const MatInfoCfg& cfg) { cfg.dump(s,false); return s; }
inline std::ostream& operator<< (std::ostream& os, const MatCfg& cfg) { cfg.dump(os,false); return os; }
inline std::ostream& operator<< (std::ostream& os, const MatInfoCfg& cfg) { cfg.dump(os,false); return os; }
}

#endif
4 changes: 2 additions & 2 deletions ncrystal_core/include/NCrystal/NCNCMATData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace NCrystal {
std::vector<std::pair<CustomSectionName,CustomSectionData>> customSections;

//Helper for validating "element" names (throws BadInput in case of problems):
static void validateElementNameByVersion(const std::string& s, unsigned version );
static void validateElementNameByVersion(const std::string&, unsigned version );

//Call this once after filling fields (and before calling validate()!) in
//order to unalias all element names (D->H2, T->H3).
Expand All @@ -139,7 +139,7 @@ namespace NCrystal {
NCMATData& operator=( NCMATData&& ) = default;

private:
void validateElementName( const std::string& s ) const;
void validateElementName( const std::string& ) const;
};

}
Expand Down
8 changes: 4 additions & 4 deletions ncrystal_core/include/NCrystal/NCTextData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@ namespace NCrystal {
{
}

inline RawStrData::RawStrData( std::string&& s, const char * srcdescr )
: RawStrData( makeSO<std::string>(std::move(s)), srcdescr )
inline RawStrData::RawStrData( std::string&& ss, const char * srcdescr )
: RawStrData( makeSO<std::string>(std::move(ss)), srcdescr )
{
}

inline bool RawStrData::hasSameContent( const std::string& s ) const
inline bool RawStrData::hasSameContent( const std::string& ss ) const
{
return hasSameContent( s.c_str(), std::next(s.c_str(),s.size()) );
return hasSameContent( ss.c_str(), std::next(ss.c_str(),ss.size()) );
}

inline bool RawStrData::hasSameContent( const RawStrData& o ) const
Expand Down
8 changes: 4 additions & 4 deletions ncrystal_core/include/NCrystal/internal/NCAtomUtils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace NCrystal {
// NB: special aliases: "D" for "H2" and "T" for "H3".
//3) Custom markers: "X", "X1", "X2", ..., "X99" (and no others).

AtomSymbol(const std::string& s);
AtomSymbol(const std::string&);
~AtomSymbol() = default;

bool isInvalid() const;
Expand Down Expand Up @@ -86,14 +86,14 @@ namespace NCrystal {
// Inline implementations //
////////////////////////////

inline NCrystal::AtomSymbol::AtomSymbol(const std::string& s)
: m_z(elementNameToZ(s)),
inline NCrystal::AtomSymbol::AtomSymbol(const std::string& ss)
: m_z(elementNameToZ(ss)),
m_a(0)
{
//Usual case of regular element names is inlined, other cases needs
//longer init:
if (m_z==0)
longInit(s);
longInit(ss);
}

inline bool NCrystal::AtomSymbol::isInvalid() const { return m_z == 0 && m_a ==0; }
Expand Down

0 comments on commit e40c670

Please sign in to comment.