From 0ddf3e110ef0f1f69ef785db867e581f813ee9a7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 2 Sep 2018 18:51:31 +1000 Subject: Cleanup: comment blocks --- source/blender/imbuf/intern/dds/ColorBlock.cpp | 42 +++++++++++++--------- .../blender/imbuf/intern/dds/DirectDrawSurface.cpp | 10 +++--- 2 files changed, 30 insertions(+), 22 deletions(-) (limited to 'source/blender/imbuf/intern/dds') diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp index d0db912f4dc..e2f52f547f0 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.cpp +++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp @@ -170,7 +170,7 @@ bool ColorBlock::isSingleColor(Color32 mask/*= Color32(0xFF, 0xFF, 0xFF, 0x00)*/ return true; } -/* +#if 0 /// Returns true if the block has a single color, ignoring transparent pixels. bool ColorBlock::isSingleColorNoAlpha() const { @@ -194,10 +194,11 @@ bool ColorBlock::isSingleColorNoAlpha() const return true; } -*/ +#endif +#if 0 /// Count number of unique colors in this color block. -/*uint ColorBlock::countUniqueColors() const +uint ColorBlock::countUniqueColors() const { uint count = 0; @@ -217,9 +218,11 @@ bool ColorBlock::isSingleColorNoAlpha() const } return count; -}*/ +} +#endif -/*/// Get average color of the block. +#if 0 +/// Get average color of the block. Color32 ColorBlock::averageColor() const { uint r, g, b, a; @@ -233,7 +236,8 @@ Color32 ColorBlock::averageColor() const } return Color32(uint8(r / 16), uint8(g / 16), uint8(b / 16), uint8(a / 16)); -}*/ +} +#endif /// Return true if the block is not fully opaque. bool ColorBlock::hasAlpha() const @@ -367,7 +371,8 @@ void ColorBlock::boundsRangeAlpha(Color32 *start, Color32 *end) const } #endif -/*/// Sort colors by abosolute value in their 16 bit representation. +#if 0 +/// Sort colors by abosolute value in their 16 bit representation. void ColorBlock::sortColorsByAbsoluteValue() { // Dummy selection sort. @@ -385,10 +390,11 @@ void ColorBlock::sortColorsByAbsoluteValue() } swap( m_color[a], m_color[max] ); } -}*/ - +} +#endif -/*/// Find extreme colors in the given axis. +#if 0 +/// Find extreme colors in the given axis. void ColorBlock::computeRange(Vector3::Arg axis, Color32 *start, Color32 *end) const { @@ -415,10 +421,11 @@ void ColorBlock::computeRange(Vector3::Arg axis, Color32 *start, Color32 *end) c *start = m_color[mini]; *end = m_color[maxi]; -}*/ - +} +#endif -/*/// Sort colors in the given axis. +#if 0 +/// Sort colors in the given axis. void ColorBlock::sortColors(const Vector3 & axis) { float luma_array[16]; @@ -439,10 +446,11 @@ void ColorBlock::sortColors(const Vector3 & axis) swap( luma_array[a], luma_array[min] ); swap( m_color[a], m_color[min] ); } -}*/ - +} +#endif -/*/// Get the volume of the color block. +#if 0 +/// Get the volume of the color block. float ColorBlock::volume() const { Box bounds; @@ -455,4 +463,4 @@ float ColorBlock::volume() const return bounds.volume(); } -*/ +#endif diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp index df9182c2c1e..8e49dba5e33 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp @@ -792,7 +792,7 @@ void DDSHeader::setUserVersion(int version) this->reserved[8] = version; } -/* +#if 0 void DDSHeader::swapBytes() { this->fourcc = POSH_LittleU32(this->fourcc); @@ -828,7 +828,7 @@ void DDSHeader::swapBytes() this->header10.arraySize = POSH_LittleU32(this->header10.arraySize); this->header10.reserved = POSH_LittleU32(this->header10.reserved); } -*/ +#endif bool DDSHeader::hasDX10Header() const { @@ -909,11 +909,11 @@ bool DirectDrawSurface::isValid() const } /* in some files DDSCAPS_TEXTURE is missing: silently ignore */ - /* - if ( !(header.caps.caps1 & DDSCAPS_TEXTURE) ) { +#if 0 + if (!(header.caps.caps1 & DDSCAPS_TEXTURE)) { return false; } - */ +#endif return true; } -- cgit v1.2.3