提交 f5277159 编写于 作者: S Stefan Weil

Fix type of bit values (fixes compiler warning)

A single bit cannot represent a signed integer value, so it must be an
unsigned integer. This fixes a compiler warning:

    In file included from ../ccutil/clst.h:24:0,
                     from ../ccstruct/blobbox.h:23,
                     from workingpartset.h:24,
                     from workingpartset.cpp:21:
    ../ccstruct/blobbox.h: In member function ‘void BLOBNBOX::set_reduced_box(TBOX)’:
    ../ccutil/host.h:79:25: warning: overflow in conversion from ‘int’ to ‘signed char:1’ changes value from ‘1’ to ‘-1’ [-Woverflow]
     #define TRUE            1
                             ^
    ../ccstruct/blobbox.h:236:17: note: in expansion of macro ‘TRUE’
           reduced = TRUE;
                     ^~~~
Signed-off-by: NStefan Weil <sw@weilnetz.de>
上级 dc8745e6
......@@ -233,7 +233,7 @@ class BLOBNBOX:public ELIST_LINK
}
void set_reduced_box(TBOX new_box) {
red_box = new_box;
reduced = TRUE;
reduced = true;
}
inT32 enclosed_area() const {
return area;
......@@ -503,8 +503,8 @@ class BLOBNBOX:public ELIST_LINK
TBOX box; // bounding box
TBOX red_box; // bounding box
int area:30; // enclosed area
int joined:1; // joined to prev
int reduced:1; // reduced box set
unsigned joined:1; // joined to prev
unsigned reduced:1; // reduced box set
int repeated_set_; // id of the set of repeated blobs
TabType left_tab_type_; // Indicates tab-stop assessment
TabType right_tab_type_; // Indicates tab-stop assessment
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册