Fix a bunch of C5266 warnings (pointless const on bool/int returns)
warning C5266: 'const' qualifier on return type has no effect Microsoft doesn't even document C5266
This commit is contained in:
parent
1cb6846df8
commit
573b66d243
|
@ -245,19 +245,19 @@ COLOR4D COLOR4D::LegacyMix( const COLOR4D& aColor ) const
|
||||||
|
|
||||||
namespace KIGFX {
|
namespace KIGFX {
|
||||||
|
|
||||||
const bool operator==( const COLOR4D& lhs, const COLOR4D& rhs )
|
bool operator==( const COLOR4D& lhs, const COLOR4D& rhs )
|
||||||
{
|
{
|
||||||
return lhs.a == rhs.a && lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b;
|
return lhs.a == rhs.a && lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator!=( const COLOR4D& lhs, const COLOR4D& rhs )
|
bool operator!=( const COLOR4D& lhs, const COLOR4D& rhs )
|
||||||
{
|
{
|
||||||
return !( lhs == rhs );
|
return !( lhs == rhs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator<( const COLOR4D& lhs, const COLOR4D& rhs )
|
bool operator<( const COLOR4D& lhs, const COLOR4D& rhs )
|
||||||
{
|
{
|
||||||
if( lhs.r < rhs.r )
|
if( lhs.r < rhs.r )
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -405,7 +405,7 @@ const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
|
wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
|
||||||
{
|
{
|
||||||
wxStockCursor stockCursor;
|
wxStockCursor stockCursor;
|
||||||
switch( aCursorType )
|
switch( aCursorType )
|
||||||
|
|
|
@ -45,13 +45,13 @@ bool BOM_FIELD::operator==( const BOM_FIELD& rhs ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator!=( const BOM_FIELD& lhs, const BOM_FIELD& rhs )
|
bool operator!=( const BOM_FIELD& lhs, const BOM_FIELD& rhs )
|
||||||
{
|
{
|
||||||
return !( lhs == rhs );
|
return !( lhs == rhs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator<( const BOM_FIELD& lhs, const BOM_FIELD& rhs )
|
bool operator<( const BOM_FIELD& lhs, const BOM_FIELD& rhs )
|
||||||
{
|
{
|
||||||
return lhs.name < rhs.name;
|
return lhs.name < rhs.name;
|
||||||
}
|
}
|
||||||
|
@ -74,13 +74,13 @@ void from_json( const nlohmann::json& j, BOM_FIELD& f )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator!=( const BOM_PRESET& lhs, const BOM_PRESET& rhs )
|
bool operator!=( const BOM_PRESET& lhs, const BOM_PRESET& rhs )
|
||||||
{
|
{
|
||||||
return !( lhs == rhs );
|
return !( lhs == rhs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator<( const BOM_PRESET& lhs, const BOM_PRESET& rhs )
|
bool operator<( const BOM_PRESET& lhs, const BOM_PRESET& rhs )
|
||||||
{
|
{
|
||||||
return lhs.name < rhs.name;
|
return lhs.name < rhs.name;
|
||||||
}
|
}
|
||||||
|
@ -172,13 +172,13 @@ bool BOM_FMT_PRESET::operator==( const BOM_FMT_PRESET& rhs ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator!=( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs )
|
bool operator!=( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs )
|
||||||
{
|
{
|
||||||
return !( lhs == rhs );
|
return !( lhs == rhs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const bool operator<( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs )
|
bool operator<( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs )
|
||||||
{
|
{
|
||||||
return lhs.name < rhs.name;
|
return lhs.name < rhs.name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,7 +430,7 @@ namespace std
|
||||||
|
|
||||||
struct SHEET_PATH_HASH
|
struct SHEET_PATH_HASH
|
||||||
{
|
{
|
||||||
const size_t operator()( const SCH_SHEET_PATH& path ) const
|
size_t operator()( const SCH_SHEET_PATH& path ) const
|
||||||
{
|
{
|
||||||
return path.GetCurrentHash();
|
return path.GetCurrentHash();
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,12 +387,12 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/// @brief Equality operator, are two colors equal
|
/// @brief Equality operator, are two colors equal
|
||||||
const bool operator==( const COLOR4D& lhs, const COLOR4D& rhs );
|
bool operator==( const COLOR4D& lhs, const COLOR4D& rhs );
|
||||||
|
|
||||||
/// @brief Not equality operator, are two colors not equal
|
/// @brief Not equality operator, are two colors not equal
|
||||||
const bool operator!=( const COLOR4D& lhs, const COLOR4D& rhs );
|
bool operator!=( const COLOR4D& lhs, const COLOR4D& rhs );
|
||||||
|
|
||||||
const bool operator<( const COLOR4D& lhs, const COLOR4D& rhs );
|
bool operator<( const COLOR4D& lhs, const COLOR4D& rhs );
|
||||||
|
|
||||||
/// Syntactic sugar for outputting colors to strings
|
/// Syntactic sugar for outputting colors to strings
|
||||||
std::ostream &operator<<( std::ostream &aStream, COLOR4D const &aColor );
|
std::ostream &operator<<( std::ostream &aStream, COLOR4D const &aColor );
|
||||||
|
|
|
@ -113,7 +113,7 @@ public:
|
||||||
|
|
||||||
static const wxCursor GetCursor( KICURSOR aCursorType );
|
static const wxCursor GetCursor( KICURSOR aCursorType );
|
||||||
|
|
||||||
static const wxStockCursor GetStockCursor( KICURSOR aCursorType );
|
static wxStockCursor GetStockCursor( KICURSOR aCursorType );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///< Internal store of cursors by ID
|
///< Internal store of cursors by ID
|
||||||
|
|
|
@ -37,8 +37,8 @@ struct BOM_FIELD
|
||||||
bool operator==( const BOM_FIELD& rhs ) const;
|
bool operator==( const BOM_FIELD& rhs ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
const bool operator!=( const BOM_FIELD& lhs, const BOM_FIELD& rhs );
|
bool operator!=( const BOM_FIELD& lhs, const BOM_FIELD& rhs );
|
||||||
const bool operator<( const BOM_FIELD& lhs, const BOM_FIELD& rhs );
|
bool operator<( const BOM_FIELD& lhs, const BOM_FIELD& rhs );
|
||||||
|
|
||||||
void to_json( nlohmann::json& j, const BOM_FIELD& f );
|
void to_json( nlohmann::json& j, const BOM_FIELD& f );
|
||||||
void from_json( const nlohmann::json& j, BOM_FIELD& f );
|
void from_json( const nlohmann::json& j, BOM_FIELD& f );
|
||||||
|
@ -63,8 +63,8 @@ struct BOM_PRESET
|
||||||
static BOM_PRESET GroupedByValueFootprint();
|
static BOM_PRESET GroupedByValueFootprint();
|
||||||
};
|
};
|
||||||
|
|
||||||
const bool operator!=( const BOM_PRESET& lhs, const BOM_PRESET& rhs );
|
bool operator!=( const BOM_PRESET& lhs, const BOM_PRESET& rhs );
|
||||||
const bool operator<( const BOM_PRESET& lhs, const BOM_PRESET& rhs );
|
bool operator<( const BOM_PRESET& lhs, const BOM_PRESET& rhs );
|
||||||
|
|
||||||
void to_json( nlohmann::json& j, const BOM_PRESET& f );
|
void to_json( nlohmann::json& j, const BOM_PRESET& f );
|
||||||
void from_json( const nlohmann::json& j, BOM_PRESET& f );
|
void from_json( const nlohmann::json& j, BOM_PRESET& f );
|
||||||
|
@ -89,8 +89,8 @@ struct BOM_FMT_PRESET
|
||||||
static BOM_FMT_PRESET Semicolons();
|
static BOM_FMT_PRESET Semicolons();
|
||||||
};
|
};
|
||||||
|
|
||||||
const bool operator!=( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs );
|
bool operator!=( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs );
|
||||||
const bool operator<( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs );
|
bool operator<( const BOM_FMT_PRESET& lhs, const BOM_FMT_PRESET& rhs );
|
||||||
|
|
||||||
void to_json( nlohmann::json& j, const BOM_FMT_PRESET& f );
|
void to_json( nlohmann::json& j, const BOM_FMT_PRESET& f );
|
||||||
void from_json( const nlohmann::json& j, BOM_FMT_PRESET& f );
|
void from_json( const nlohmann::json& j, BOM_FMT_PRESET& f );
|
||||||
|
|
|
@ -189,7 +189,7 @@ public:
|
||||||
*
|
*
|
||||||
* It is used in context menu.
|
* It is used in context menu.
|
||||||
*/
|
*/
|
||||||
const BITMAPS GetIcon() const
|
BITMAPS GetIcon() const
|
||||||
{
|
{
|
||||||
return m_icon;
|
return m_icon;
|
||||||
}
|
}
|
||||||
|
|
|
@ -538,7 +538,7 @@ const VECTOR2<T> LexicographicalMin( const VECTOR2<T>& aA, const VECTOR2<T>& aB
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
const int LexicographicalCompare( const VECTOR2<T>& aA, const VECTOR2<T>& aB )
|
int LexicographicalCompare( const VECTOR2<T>& aA, const VECTOR2<T>& aB )
|
||||||
{
|
{
|
||||||
if( aA.x < aB.x )
|
if( aA.x < aB.x )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue