mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 14:41:36 +08:00
Fix compiler warning [-Wshadow-field-in-constructor]
clang warning: src/ccstruct/polyblk.cpp:48:36: warning: constructor parameter 'box' shadows the field 'box' of 'POLY_BLOCK' [-Wshadow-field-in-constructor] Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
c1be1024be
commit
d960a50c12
@ -1,8 +1,6 @@
|
||||
/**********************************************************************
|
||||
* File: polyblk.cpp (Formerly poly_block.c)
|
||||
* Description: Polygonal blocks
|
||||
* Author: Sheelagh Lloyd?
|
||||
* Created:
|
||||
*
|
||||
* (C) Copyright 1993, Hewlett-Packard Ltd.
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -45,14 +43,14 @@ POLY_BLOCK::POLY_BLOCK(ICOORDELT_LIST *points, PolyBlockType t) {
|
||||
}
|
||||
|
||||
// Initialize from box coordinates.
|
||||
POLY_BLOCK::POLY_BLOCK(const TBOX& box, PolyBlockType t) {
|
||||
POLY_BLOCK::POLY_BLOCK(const TBOX& tbox, PolyBlockType t) {
|
||||
vertices.clear();
|
||||
ICOORDELT_IT v = &vertices;
|
||||
v.move_to_first();
|
||||
v.add_to_end(new ICOORDELT(box.left(), box.top()));
|
||||
v.add_to_end(new ICOORDELT(box.left(), box.bottom()));
|
||||
v.add_to_end(new ICOORDELT(box.right(), box.bottom()));
|
||||
v.add_to_end(new ICOORDELT(box.right(), box.top()));
|
||||
v.add_to_end(new ICOORDELT(tbox.left(), tbox.top()));
|
||||
v.add_to_end(new ICOORDELT(tbox.left(), tbox.bottom()));
|
||||
v.add_to_end(new ICOORDELT(tbox.right(), tbox.bottom()));
|
||||
v.add_to_end(new ICOORDELT(tbox.right(), tbox.top()));
|
||||
compute_bb();
|
||||
type = t;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class DLLSYM POLY_BLOCK {
|
||||
public:
|
||||
POLY_BLOCK() = default;
|
||||
// Initialize from box coordinates.
|
||||
POLY_BLOCK(const TBOX& box, PolyBlockType type);
|
||||
POLY_BLOCK(const TBOX& tbox, PolyBlockType type);
|
||||
POLY_BLOCK(ICOORDELT_LIST *points, PolyBlockType type);
|
||||
~POLY_BLOCK () = default;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user