[F] Fixed compilation error with c++

This commit is contained in:
seleznevae 2019-01-12 14:37:07 +03:00
parent 51d270b4a9
commit 3878f0c48e
3 changed files with 10 additions and 4 deletions

View File

@ -138,6 +138,12 @@ script:
- rm fort.o - rm fort.o
- cd .. - cd ..
# basic build c++ compiler
- cd lib
- ${CXX} -Wall -Wextra -Werror fort.c -c -o fort.o
- rm fort.o
- cd ..
# cppcheck run # cppcheck run
- | - |

View File

@ -2927,14 +2927,14 @@ static fort_status_t set_cell_property_impl(fort_cell_props_t *opt, uint32_t pro
if (v == FT_TSTYLE_DEFAULT) { if (v == FT_TSTYLE_DEFAULT) {
opt->cell_text_style = FT_TSTYLE_DEFAULT; opt->cell_text_style = FT_TSTYLE_DEFAULT;
} else { } else {
opt->cell_text_style |= v; opt->cell_text_style = (enum ft_text_style)(opt->cell_text_style | v);
} }
} else if (PROP_IS_SET(property, FT_CPROP_CONT_TEXT_STYLE)) { } else if (PROP_IS_SET(property, FT_CPROP_CONT_TEXT_STYLE)) {
enum ft_text_style v = (enum ft_text_style)value; enum ft_text_style v = (enum ft_text_style)value;
if (v == FT_TSTYLE_DEFAULT) { if (v == FT_TSTYLE_DEFAULT) {
opt->content_text_style = v; opt->content_text_style = v;
} else { } else {
opt->content_text_style |= v; opt->content_text_style = (enum ft_text_style)(opt->content_text_style | v);
} }
} }

View File

@ -471,14 +471,14 @@ static fort_status_t set_cell_property_impl(fort_cell_props_t *opt, uint32_t pro
if (v == FT_TSTYLE_DEFAULT) { if (v == FT_TSTYLE_DEFAULT) {
opt->cell_text_style = FT_TSTYLE_DEFAULT; opt->cell_text_style = FT_TSTYLE_DEFAULT;
} else { } else {
opt->cell_text_style |= v; opt->cell_text_style = (enum ft_text_style)(opt->cell_text_style | v);
} }
} else if (PROP_IS_SET(property, FT_CPROP_CONT_TEXT_STYLE)) { } else if (PROP_IS_SET(property, FT_CPROP_CONT_TEXT_STYLE)) {
enum ft_text_style v = (enum ft_text_style)value; enum ft_text_style v = (enum ft_text_style)value;
if (v == FT_TSTYLE_DEFAULT) { if (v == FT_TSTYLE_DEFAULT) {
opt->content_text_style = v; opt->content_text_style = v;
} else { } else {
opt->content_text_style |= v; opt->content_text_style = (enum ft_text_style)(opt->content_text_style | v);
} }
} }