Skip to content

Commit

Permalink
stringrenderer: Fix compiler warning (-Wwrite-strings)
Browse files Browse the repository at this point in the history
gcc reported this warning:

../training/stringrenderer.cpp:
 In member function ‘void tesseract::StringRenderer::SetLayoutProperties()’:
../training/stringrenderer.cpp:211:42: warning:
 ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     set_features("liga, clig, dlig, hlig");
                                          ^
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Aug 28, 2016
1 parent 939023f commit 34ed8dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion training/stringrenderer.h
Expand Up @@ -90,7 +90,7 @@ class StringRenderer {
void set_underline_style(const PangoUnderline style) {
underline_style_ = style;
}
void set_features(char *features) {
void set_features(const char *features) {
free(features_);
features_ = strdup(features);
}
Expand Down

0 comments on commit 34ed8dd

Please sign in to comment.