Kaydet (Commit) d5f94d93 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constparams in basegfx,sax,shell

Change-Id: I90a9d105a6db146ae64cff56983def94b9472a95
Reviewed-on: https://gerrit.libreoffice.org/40043Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ff8e463a
......@@ -555,7 +555,7 @@ namespace basegfx
sal_uInt32 scissorLineSegment( ::basegfx::B2DPoint *in_vertex, // input buffer
sal_uInt32 in_count, // number of verts in input buffer
::basegfx::B2DPoint *out_vertex, // output buffer
scissor_plane *pPlane, // scissoring plane
scissor_plane const *pPlane, // scissoring plane
const ::basegfx::B2DRectangle &rR ) // clipping rectangle
{
......
......@@ -114,7 +114,7 @@ namespace basegfx
B2DPolygon maResult;
void handleClosingEdge(const B2DPoint& rStart, const B2DPoint& rEnd);
bool CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry* pEdgeB, const B2DPoint& rTestPoint);
bool CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry const * pEdgeB, const B2DPoint& rTestPoint);
void createTriangle(const B2DPoint& rA, const B2DPoint& rB, const B2DPoint& rC);
public:
......@@ -178,7 +178,7 @@ namespace basegfx
}
}
bool Triangulator::CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry* pEdgeB, const B2DPoint& rTestPoint)
bool Triangulator::CheckPointInTriangle(EdgeEntry* pEdgeA, EdgeEntry const * pEdgeB, const B2DPoint& rTestPoint)
{
// inside triangle or on edge?
if(tools::isPointInTriangle(pEdgeA->getStart(), pEdgeA->getEnd(), pEdgeB->getEnd(), rTestPoint, true))
......
......@@ -235,7 +235,7 @@ namespace basegfx
}
/// This is a very uncommon case but why not ...
void freeIfLast(B2DPoint *pPoint)
void freeIfLast(B2DPoint const *pPoint)
{
// just re-use the last point if we can.
if ( nCurPoint > 0 && pPoint == mpPointBase + nCurPoint - 1 )
......
......@@ -278,11 +278,11 @@ namespace basegfx
processing must proceed with, when going through the
list of upcoming active edges).
*/
std::ptrdiff_t intersect( SweepLineEvent& rEvent,
ActiveEdge& rActiveEdge,
VectorOfPolygons& rPolygonPool,
B2DPolyPolygon& rRes,
bool isFinishingEdge )
std::ptrdiff_t intersect( SweepLineEvent const & rEvent,
ActiveEdge& rActiveEdge,
VectorOfPolygons& rPolygonPool,
B2DPolyPolygon& rRes,
bool isFinishingEdge )
{
OSL_PRECOND( !mbIsFinished,
"ImplPolygon::intersect(): called on already finished polygon!" );
......@@ -338,8 +338,8 @@ namespace basegfx
}
private:
void handleInitialOwnEdge(SweepLineEvent& rEvent,
ActiveEdge& rActiveEdge)
void handleInitialOwnEdge(SweepLineEvent const & rEvent,
ActiveEdge& rActiveEdge)
{
const bool isActiveEdgeProceedLeft(
rActiveEdge.getEdgeDirection() == ActiveEdge::PROCEED_LEFT);
......@@ -363,9 +363,9 @@ namespace basegfx
mpLeadingRightEdge = &rActiveEdge;
}
void handleFinalOwnLeftEdge(ActiveEdge& rActiveEdge,
VectorOfPolygons& rPolygonPool,
B2DPolyPolygon& rRes)
void handleFinalOwnLeftEdge(ActiveEdge const & rActiveEdge,
VectorOfPolygons& rPolygonPool,
B2DPolyPolygon& rRes)
{
OSL_ENSURE( rActiveEdge.getEdgeDirection() == ActiveEdge::PROCEED_LEFT,
"ImplPolygon::handleFinalOwnLeftEdge(): end edge wrong polygon order" );
......@@ -465,8 +465,8 @@ namespace basegfx
}
/// True when sweep line hits our own active edge
static bool metOwnEdge(const SweepLineEvent& rEvent,
ActiveEdge& rActiveEdge)
static bool metOwnEdge(SweepLineEvent const & rEvent,
ActiveEdge const & rActiveEdge)
{
const bool bHitOwnEdge=&rEvent.getRect() == &rActiveEdge.getRect();
return bHitOwnEdge;
......@@ -604,9 +604,9 @@ namespace basegfx
@param rCurrEvent
The actual event that caused this call
*/
void createActiveEdgesFromStartEvent( ListOfEdges& io_rEdgeList,
VectorOfPolygons& io_rPolygonPool,
SweepLineEvent& rCurrEvent )
void createActiveEdgesFromStartEvent( ListOfEdges & io_rEdgeList,
VectorOfPolygons & io_rPolygonPool,
SweepLineEvent const & rCurrEvent )
{
ListOfEdges aNewEdges;
const B2DRectangle& rRect=rCurrEvent.getRect();
......@@ -686,8 +686,8 @@ namespace basegfx
aNewEdges );
}
inline bool isSameRect(ActiveEdge& rEdge,
const basegfx::B2DRange& rRect)
inline bool isSameRect(ActiveEdge const & rEdge,
basegfx::B2DRange const & rRect)
{
return &rEdge.getRect() == &rRect;
}
......
......@@ -66,7 +66,7 @@ class SAX_DLLPUBLIC FastTokenHandlerBase
*/
static sal_Int32 getTokenFromChars(
const css::uno::Reference<css::xml::sax::XFastTokenHandler > &xTokenHandler,
FastTokenHandlerBase *pTokenHandler /* can be NULL */,
const FastTokenHandlerBase *pTokenHandler /* can be NULL */,
const char *pStr, size_t nLength );
};
......
......@@ -80,7 +80,7 @@ public:
~XMLFile2UTFConverter();
void setInputStream( css::uno::Reference< css::io::XInputStream > &r ) { m_in = r; }
void setInputStream( css::uno::Reference< css::io::XInputStream > const &r ) { m_in = r; }
void setEncoding( const OString &s ) { m_sEncoding = s; }
......
......@@ -56,7 +56,7 @@ private:
public:
NamespaceHandler();
void addNSDeclAttributes( rtl::Reference < comphelper::AttributeList >& rAttrList );
void addNSDeclAttributes( rtl::Reference < comphelper::AttributeList > const & rAttrList );
//XFastNamespaceHandler
virtual void SAL_CALL registerNamespace( const OUString& rNamespacePrefix, const OUString& rNamespaceURI ) override;
......@@ -67,7 +67,7 @@ NamespaceHandler::NamespaceHandler()
{
}
void NamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::AttributeList >& rAttrList )
void NamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::AttributeList > const & rAttrList )
{
for(const auto& aNamespaceDefine : m_aNamespaceDefines)
{
......
......@@ -240,7 +240,7 @@ const FastAttributeList::FastAttributeIter FastAttributeList::find( sal_Int32 nT
sal_Int32 FastTokenHandlerBase::getTokenFromChars(
const css::uno::Reference< css::xml::sax::XFastTokenHandler > &xTokenHandler,
FastTokenHandlerBase *pTokenHandler,
const FastTokenHandlerBase *pTokenHandler,
const char *pToken, size_t nLen /* = 0 */ )
{
sal_Int32 nRet;
......
......@@ -296,7 +296,7 @@ namespace sax_fastparser {
}
#endif
void FastSaxSerializer::startFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList )
void FastSaxSerializer::startFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList )
{
if ( !mbMarkStackEmpty )
{
......@@ -358,7 +358,7 @@ namespace sax_fastparser {
writeBytes(sClosingBracket, N_CHARS(sClosingBracket));
}
void FastSaxSerializer::singleFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList )
void FastSaxSerializer::singleFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList )
{
if ( !mbMarkStackEmpty )
{
......@@ -410,7 +410,7 @@ namespace sax_fastparser {
maTokenValues.clear();
}
void FastSaxSerializer::writeFastAttributeList(FastAttributeList& rAttrList)
void FastSaxSerializer::writeFastAttributeList(FastAttributeList const & rAttrList)
{
#ifdef DBG_UTIL
::std::set<OString> DebugAttributes;
......
......@@ -80,7 +80,7 @@ public:
from the element.
*/
void startFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = nullptr );
void startFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList = nullptr );
/** receives notification of the end of an known element.
@see startFastElement
......@@ -104,7 +104,7 @@ public:
from the element.
*/
void singleFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = nullptr );
void singleFastElement( ::sal_Int32 Element, FastAttributeList const * pAttrList = nullptr );
// C++ helpers
void writeId( ::sal_Int32 Element );
......@@ -237,7 +237,7 @@ private:
#endif
void writeTokenValueList();
void writeFastAttributeList(FastAttributeList& rAttrList);
void writeFastAttributeList(FastAttributeList const & rAttrList);
/** Forward the call to the output stream, or write to the stack.
......
......@@ -272,7 +272,7 @@ namespace /* private */ {
void read_recently_used_items(
recently_used_file& file,
recently_used_file const & file,
recently_used_item_list_t& item_list)
{
xml_parser xparser;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment