Fixes by clang-format

This commit is contained in:
Kristian Bendiksen 2020-06-22 14:36:35 +02:00
parent 6a15958654
commit 4eb483a549
2 changed files with 9 additions and 9 deletions

View File

@ -132,24 +132,24 @@ caf::ColorTable ColorTable::inverted() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool ColorTable::contains(const cvf::Color3ub& color) const bool ColorTable::contains( const cvf::Color3ub& color ) const
{ {
auto it = std::find(m_colors.begin(), m_colors.end(), color); auto it = std::find( m_colors.begin(), m_colors.end(), color );
return it != m_colors.end(); return it != m_colors.end();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool ColorTable::contains(const cvf::Color3f& color) const bool ColorTable::contains( const cvf::Color3f& color ) const
{ {
return contains(cvf::Color3ub(color)); return contains( cvf::Color3ub( color ) );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::Color3ub ColorTable::fromQColor(const QColor& color) cvf::Color3ub ColorTable::fromQColor( const QColor& color )
{ {
return cvf::Color3ub( color.red(), color.green(), color.blue() ); return cvf::Color3ub( color.red(), color.green(), color.blue() );
} }

View File

@ -67,11 +67,11 @@ public:
ColorTable inverted() const; ColorTable inverted() const;
bool contains(const cvf::Color3ub& color) const; bool contains( const cvf::Color3ub& color ) const;
bool contains(const cvf::Color3f& color) const; bool contains( const cvf::Color3f& color ) const;
static cvf::Color3ub fromQColor(const QColor& color); static cvf::Color3ub fromQColor( const QColor& color );
static cvf::Color3ubArray interpolateColorArray(const cvf::Color3ubArray& colorArray, size_t targetColorCount); static cvf::Color3ubArray interpolateColorArray( const cvf::Color3ubArray& colorArray, size_t targetColorCount );
private: private:
const std::vector<cvf::Color3ub> m_colors; const std::vector<cvf::Color3ub> m_colors;