[Libreoffice-commits] core.git: basebmp/inc
Noel Grandin
noel at peralex.com
Tue Oct 27 01:15:56 PDT 2015
basebmp/inc/accessor.hxx | 11 ---
basebmp/inc/accessoradapters.hxx | 104 ------------------------------
basebmp/inc/colorblendaccessoradapter.hxx | 19 -----
basebmp/inc/colortraits.hxx | 12 ---
basebmp/inc/compositeiterator.hxx | 24 ------
basebmp/inc/endian.hxx | 4 -
basebmp/inc/genericcolorimageaccessor.hxx | 10 --
basebmp/inc/packedpixeliterator.hxx | 49 --------------
basebmp/inc/paletteimageaccessor.hxx | 15 ----
basebmp/inc/pixeliterator.hxx | 45 ------------
basebmp/inc/tools.hxx | 11 ---
11 files changed, 304 deletions(-)
New commits:
commit 1b4dff2c371d31c99f34324c3f6f31888bdc34d7
Author: Noel Grandin <noel at peralex.com>
Date: Tue Oct 27 02:22:20 2015 +0100
loplugin:unusedmethods
Change-Id: If703da1323e38df1c5e84d97a7d467dc8e639421
Reviewed-on: https://gerrit.libreoffice.org/19618
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/basebmp/inc/accessor.hxx b/basebmp/inc/accessor.hxx
index 828d8fe..1aaae4c 100644
--- a/basebmp/inc/accessor.hxx
+++ b/basebmp/inc/accessor.hxx
@@ -57,11 +57,6 @@ public:
*i = vigra::detail::RequiresExplicitCast<value_type>::cast(value);
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- i[diff] = vigra::detail::RequiresExplicitCast<value_type>::cast(value);
- }
};
@@ -98,12 +93,6 @@ public:
i.set( vigra::detail::RequiresExplicitCast<value_type>::cast(value) );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- i.set( vigra::detail::RequiresExplicitCast<value_type>::cast(value),
- diff );
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/accessoradapters.hxx b/basebmp/inc/accessoradapters.hxx
index 8680565..109fe92e 100644
--- a/basebmp/inc/accessoradapters.hxx
+++ b/basebmp/inc/accessoradapters.hxx
@@ -92,23 +92,11 @@ public:
{}
-
- WrappedAccessor const& getWrappedAccessor() const { return maAccessor; }
- WrappedAccessor& getWrappedAccessor() { return maAccessor; }
-
-
-
- value_type getter(typename GetterFunctor::argument_type v) const
- {
- return maGetterFunctor(v);
- }
typename SetterFunctor::result_type setter(argument_type v) const
{
return maSetterFunctor(v);
}
-
-
template< class Iterator >
value_type operator()(Iterator const& i) const
{
@@ -132,16 +120,6 @@ public:
i );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- maAccessor.set(
- maSetterFunctor(
- vigra::detail::RequiresExplicitCast<argument_type>::cast(value) ),
- i,
- diff );
- }
-
};
@@ -203,19 +181,6 @@ public:
- WrappedAccessor const& getWrappedAccessor() const { return maAccessor; }
- WrappedAccessor& getWrappedAccessor() { return maAccessor; }
-
-
-
- static typename SetterFunctor::result_type setter(
- typename SetterFunctor::first_argument_type v1,
- argument_type v2 )
- {
- return maSetterFunctor(v1,v2);
- }
-
-
template< class Iterator >
value_type operator()(Iterator const& i) const
@@ -240,16 +205,6 @@ public:
i );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- maAccessor.set(
- maFunctor(maAccessor(i,diff),
- vigra::detail::RequiresExplicitCast<argument_type>::cast(value)),
- i,
- diff );
- }
-
};
@@ -338,19 +293,6 @@ public:
WrappedAccessor1 const& get1stWrappedAccessor() const { return ma1stAccessor; }
WrappedAccessor1& get1stWrappedAccessor() { return ma1stAccessor; }
- WrappedAccessor2 const& get2ndWrappedAccessor() const { return ma2ndAccessor; }
- WrappedAccessor2& get2ndWrappedAccessor() { return ma2ndAccessor; }
-
-
-
- static typename Functor::result_type setter(
- typename Functor::first_argument_type v1,
- typename Functor::second_argument_type v2,
- argument_type v3 )
- {
- return maSetterFunctor(v1,v2,v3);
- }
-
template< class Iterator >
@@ -377,17 +319,6 @@ public:
i.first() );
}
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- ma1stAccessor.set(
- maFunctor(ma1stAccessor(i.first(), diff),
- ma2ndAccessor(i.second(),diff),
- vigra::detail::RequiresExplicitCast<argument_type>::cast(value)),
- i.first(),
- diff );
- }
-
};
@@ -459,13 +390,6 @@ public:
- WrappedAccessor1 const& get1stWrappedAccessor() const { return ma1stAccessor; }
- WrappedAccessor1& get1stWrappedAccessor() { return ma1stAccessor; }
-
- WrappedAccessor2 const& get2ndWrappedAccessor() const { return ma2ndAccessor; }
- WrappedAccessor2& get2ndWrappedAccessor() { return ma2ndAccessor; }
-
-
template< class Iterator >
value_type operator()(Iterator const& i) const
@@ -483,34 +407,6 @@ public:
- template< typename V, class Iterator >
- void set(V const& value, Iterator const& i) const
- {
- ma1stAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor1::value_type>::cast(
- value.first),
- i.first() );
- ma2ndAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor2::value_type>::cast(
- value.second),
- i.second() );
- }
-
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- ma1stAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor1::value_type>::cast(
- value.first),
- i.first(),
- diff );
- ma2ndAccessor.set(
- vigra::detail::RequiresExplicitCast<typename WrappedAccessor2::value_type>::cast(
- value.second),
- i.second(),
- diff );
- }
-
};
} // namespace basebmp
diff --git a/basebmp/inc/colorblendaccessoradapter.hxx b/basebmp/inc/colorblendaccessoradapter.hxx
index b9465fb..767d55e 100644
--- a/basebmp/inc/colorblendaccessoradapter.hxx
+++ b/basebmp/inc/colorblendaccessoradapter.hxx
@@ -86,14 +86,6 @@ public:
void setColor( color_type col ) { maBlendColor=col; }
- color_type getColor() { return maBlendColor; }
- void setGetterValue( value_type val ) { maGetterValue=val; }
- value_type getGetterValue() { return maGetterValue; }
-
-
-
- WrappedAccessor const& getWrappedAccessor() const { return maWrappee; }
- WrappedAccessor& getWrappedAccessor() { return maWrappee; }
@@ -122,17 +114,6 @@ public:
i );
}
- template< typename V, typename IteratorType, class Difference >
- void set(V const& value, IteratorType const& i, Difference const& diff) const
- {
- maWrappee.set(
- maFunctor(
- vigra::detail::RequiresExplicitCast<alpha_type>::cast(value),
- maWrappee(i,diff),
- maBlendColor),
- i,
- diff );
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/colortraits.hxx b/basebmp/inc/colortraits.hxx
index 5a54645..cee8507 100644
--- a/basebmp/inc/colortraits.hxx
+++ b/basebmp/inc/colortraits.hxx
@@ -113,21 +113,9 @@ template< typename ColorType > struct ColorTraits
IntegerBlendFunctor< ColorType, AlphaType, polarity >,
BlendFunctor< ColorType, AlphaType, polarity > > {};
- /// @return number of color channels
- static int numChannels() { return 1; }
-
/// Type of a color component (i.e. the type of an individual channel)
typedef ColorType component_type;
- static inline component_type toGreyscale( ColorType c )
- {
- return c;
- }
-
- static inline ColorType fromGreyscale( component_type c )
- {
- return c;
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/compositeiterator.hxx b/basebmp/inc/compositeiterator.hxx
index 2db654a..31d98ff 100644
--- a/basebmp/inc/compositeiterator.hxx
+++ b/basebmp/inc/compositeiterator.hxx
@@ -209,30 +209,6 @@ namespace detail
return ret;
}
- value_type get() const
- {
- return value_type(pImpl->maIter1.get(),
- pImpl->maIter2.get());
- }
-
- value_type get(difference_type const & d) const
- {
- return value_type(pImpl->maIter1.get(d),
- pImpl->maIter2.get(d));
- }
-
- void set( value_type v ) const
- {
- pImpl->maIter1.set(v);
- pImpl->maIter2.set(v);
- }
-
- void set( value_type v, difference_type const & d ) const
- {
- pImpl->maIter1.set(v,d);
- pImpl->maIter2.set(v,d);
- }
-
CompositeIteratorBase& operator=(const CompositeIteratorBase& rNew)
{
this->pImpl->maIter1 = rNew.pImpl->maIter1;
diff --git a/basebmp/inc/endian.hxx b/basebmp/inc/endian.hxx
index a924f5a..e3c25eb 100644
--- a/basebmp/inc/endian.hxx
+++ b/basebmp/inc/endian.hxx
@@ -35,11 +35,7 @@ template< typename T > inline T byteSwap( T );
}
// byteSwap<T> shall fail for any type T not in the list below
-BASEBMP_BYTE_SWAP(sal_Int8,)
-BASEBMP_BYTE_SWAP(sal_uInt8,)
-BASEBMP_BYTE_SWAP(sal_Int16,OSL_SWAPWORD)
BASEBMP_BYTE_SWAP(sal_uInt16,OSL_SWAPWORD)
-BASEBMP_BYTE_SWAP(sal_Int32,OSL_SWAPDWORD)
BASEBMP_BYTE_SWAP(sal_uInt32,OSL_SWAPDWORD)
#undef BASEBMP_BYTE_SWAP
diff --git a/basebmp/inc/genericcolorimageaccessor.hxx b/basebmp/inc/genericcolorimageaccessor.hxx
index 3db0fde..346da7c 100644
--- a/basebmp/inc/genericcolorimageaccessor.hxx
+++ b/basebmp/inc/genericcolorimageaccessor.hxx
@@ -58,16 +58,6 @@ namespace basebmp
{ return mpDevice->getPixel( basegfx::B2IPoint( i[diff]->x,
i[diff]->y ) ); }
- template< typename Iterator >
- void set(Color const& value, Iterator const& i) const
- { return mpDevice->setPixel( basegfx::B2IPoint( i->x,i->y ),
- value, meDrawMode ); }
-
- template< class Iterator, class Difference >
- void set(value_type const& value, Iterator const& i, Difference const& diff) const
- { return mpDevice->setPixel( basegfx::B2IPoint( i[diff]->x,
- i[diff]->y ),
- value, meDrawMode ); }
};
}
diff --git a/basebmp/inc/packedpixeliterator.hxx b/basebmp/inc/packedpixeliterator.hxx
index b7bcac0..776a45e 100644
--- a/basebmp/inc/packedpixeliterator.hxx
+++ b/basebmp/inc/packedpixeliterator.hxx
@@ -211,22 +211,12 @@ public:
return unsigned_cast<value_type>(*y() & mask_) >> shift_;
}
- value_type get(difference_type d) const
- {
- return unsigned_cast<value_type>(*y(d) & mask_) >> shift_;
- }
-
void set( value_type v ) const
{
const value_type pixel_value( (v << shift_) & mask_ );
*y() = (*y() & ~mask_) | pixel_value;
}
- void set( value_type v, difference_type d ) const
- {
- const value_type pixel_value( (v << shift_) & mask_ );
- *y(d) = (*y(d) & ~mask_) | pixel_value;
- }
};
template< typename Valuetype,
@@ -445,13 +435,6 @@ public:
MsbFirst>(remainder_);
}
- value_type get(difference_type d) const
- {
- PackedPixelRowIterator tmp(*this);
- tmp += d;
- return tmp.get();
- }
-
void set( value_type v ) const
{
const value_type pixel_value(
@@ -460,13 +443,6 @@ public:
& mask_ );
*data_ = (*data_ & ~mask_) | pixel_value;
}
-
- void set( value_type v, difference_type d ) const
- {
- PackedPixelRowIterator tmp(*this);
- tmp += d;
- tmp.set(v);
- }
};
/** 2D image iterator for packed pixel formats
@@ -513,11 +489,6 @@ private:
return y() + (x / num_intraword_positions);
}
- pointer current(int dx, int dy) const
- {
- return y(dy) + ((x+dx)/num_intraword_positions);
- }
-
bool equal(PackedPixelIterator const & rhs) const
{
return (x == rhs.x) && (y == rhs.y);
@@ -601,15 +572,6 @@ public:
>> get_shift<num_intraword_positions, bits_per_pixel, MsbFirst>(remainder));
}
- value_type get(difference_type const & d) const
- {
- const int remainder( x(d.x) % num_intraword_positions );
-
- return (unsigned_cast<value_type>(*current(d.x,d.y) &
- get_mask<value_type, bits_per_pixel, MsbFirst>(remainder))
- >> get_shift<num_intraword_positions, bits_per_pixel, MsbFirst>(remainder));
- }
-
void set( value_type v ) const
{
const int remainder( x % num_intraword_positions );
@@ -622,17 +584,6 @@ public:
*p = (*p & ~mask) | pixel_value;
}
- void set( value_type v, difference_type const & d ) const
- {
- const int remainder( (x + d.x) % num_intraword_positions );
- const int mask( get_mask<value_type, bits_per_pixel, MsbFirst>(remainder) );
- const value_type pixel_value(
- (v <<
- get_shift<num_intraword_positions, bits_per_pixel, MsbFirst>(remainder))
- & mask );
- pointer p = current(d.x,d.y);
- *p = (*p & ~mask) | pixel_value;
- }
};
diff --git a/basebmp/inc/paletteimageaccessor.hxx b/basebmp/inc/paletteimageaccessor.hxx
index 85d5488..d62fb46 100644
--- a/basebmp/inc/paletteimageaccessor.hxx
+++ b/basebmp/inc/paletteimageaccessor.hxx
@@ -88,11 +88,6 @@ public:
- Accessor const& getWrappedAccessor() const { return maAccessor; }
- Accessor& getWrappedAccessor() { return maAccessor; }
-
-
-
data_type lookup(value_type const& v) const
{
// TODO(P3): use table-based/octree approach here!
@@ -143,16 +138,6 @@ public:
vigra::detail::RequiresExplicitCast<value_type>::cast(value) ),
i );
}
-
- template< typename V, class Iterator, class Difference >
- void set(V const& value, Iterator const& i, Difference const& diff) const
- {
- maAccessor.set(
- lookup(
- vigra::detail::RequiresExplicitCast<value_type>::cast(value) ),
- i,
- diff );
- }
};
} // namespace basebmp
diff --git a/basebmp/inc/pixeliterator.hxx b/basebmp/inc/pixeliterator.hxx
index d38af98..7f80c97 100644
--- a/basebmp/inc/pixeliterator.hxx
+++ b/basebmp/inc/pixeliterator.hxx
@@ -154,26 +154,6 @@ public:
return y - rhs.y;
}
- value_type get() const
- {
- return *y();
- }
-
- value_type get(difference_type d) const
- {
- return *y(d);
- }
-
- void set( value_type v ) const
- {
- *y() = v;
- }
-
- void set( value_type v, difference_type d ) const
- {
- *y(d) = v;
- }
-
reference operator*() const
{
return *y();
@@ -224,11 +204,6 @@ private:
return y() + x;
}
- pointer current(int dx, int dy) const
- {
- return y(dy) + x+dx;
- }
-
public:
PixelIterator() :
x(0),
@@ -296,26 +271,6 @@ public:
return column_iterator(y,x);
}
- value_type get() const
- {
- return *current();
- }
-
- value_type get(difference_type const & d) const
- {
- return *current(d.y, d.x);
- }
-
- void set( value_type v ) const
- {
- *current() = v;
- }
-
- void set( value_type v, difference_type const & d ) const
- {
- *current(d.y,d.x) = v;
- }
-
reference operator*() const
{
return *current();
diff --git a/basebmp/inc/tools.hxx b/basebmp/inc/tools.hxx
index c562a30..e61d1ca 100644
--- a/basebmp/inc/tools.hxx
+++ b/basebmp/inc/tools.hxx
@@ -59,17 +59,6 @@ namespace basebmp
template< class Iterator, class Accessor >
inline vigra::pair<Iterator,Accessor>
- srcIter(Iterator const& begin,
- Accessor const& accessor,
- const basegfx::B2IPoint& rPt)
- {
- return vigra::pair<Iterator,Accessor>(
- begin + vigra::Diff2D(rPt.getX(),rPt.getY()),
- accessor);
- }
-
- template< class Iterator, class Accessor >
- inline vigra::pair<Iterator,Accessor>
destIter(Iterator const& begin,
Accessor const& accessor,
const basegfx::B2IPoint& rPt)
More information about the Libreoffice-commits
mailing list