Path style comparison operators
This commit is contained in:
parent
f519387dad
commit
3ef6dcd55e
2 changed files with 19 additions and 0 deletions
|
@ -66,6 +66,9 @@ class T_FSPathStyle
|
||||||
constexpr bool isSeparator( T_Character chr ) const noexcept;
|
constexpr bool isSeparator( T_Character chr ) const noexcept;
|
||||||
bool isValidRoot( T_String const& string ) const noexcept;
|
bool isValidRoot( T_String const& string ) const noexcept;
|
||||||
|
|
||||||
|
constexpr bool operator ==( T_FSPathStyle const& other ) const noexcept;
|
||||||
|
constexpr bool operator !=( T_FSPathStyle const& other ) const noexcept;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Pre-initialised styles
|
// Pre-initialised styles
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,22 @@ inline constexpr bool T_FSPathStyle::isSeparator(
|
||||||
|| ( ( pathSeparators_ & E_FSPathSeparator::SLASH ) && chr == '\\' );
|
|| ( ( pathSeparators_ & E_FSPathSeparator::SLASH ) && chr == '\\' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline constexpr bool T_FSPathStyle::operator ==(
|
||||||
|
T_FSPathStyle const& other ) const noexcept
|
||||||
|
{
|
||||||
|
return pathSeparators_ == other.pathSeparators_
|
||||||
|
&& caseSensitive_ == other.caseSensitive_
|
||||||
|
&& hasDriveLetter_ == other.hasDriveLetter_;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline constexpr bool T_FSPathStyle::operator !=(
|
||||||
|
T_FSPathStyle const& other ) const noexcept
|
||||||
|
{
|
||||||
|
return pathSeparators_ != other.pathSeparators_
|
||||||
|
|| caseSensitive_ != other.caseSensitive_
|
||||||
|
|| hasDriveLetter_ != other.hasDriveLetter_;
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
inline constexpr T_FSPathStyle T_FSPathStyle::Unix( )
|
inline constexpr T_FSPathStyle T_FSPathStyle::Unix( )
|
||||||
|
|
Loading…
Reference in a new issue