cppcheck
This commit is contained in:
@@ -80,27 +80,27 @@ void Text::loadFont(const char* fnt_file) {
|
||||
// Elimina comentaris inline
|
||||
auto comment_pos = line.find('#');
|
||||
if (comment_pos != std::string::npos) {
|
||||
line = line.substr(0, comment_pos);
|
||||
line.resize(comment_pos);
|
||||
}
|
||||
|
||||
// Parseja directives
|
||||
if (line.find("box_width") == 0) {
|
||||
if (line.starts_with("box_width")) {
|
||||
sscanf(line.c_str(), "box_width %d", &box_width_);
|
||||
continue;
|
||||
}
|
||||
if (line.find("box_height") == 0) {
|
||||
if (line.starts_with("box_height")) {
|
||||
sscanf(line.c_str(), "box_height %d", &box_height_);
|
||||
continue;
|
||||
}
|
||||
if (line.find("columns") == 0) {
|
||||
if (line.starts_with("columns")) {
|
||||
sscanf(line.c_str(), "columns %d", &columns_);
|
||||
continue;
|
||||
}
|
||||
if (line.find("cell_spacing") == 0) {
|
||||
if (line.starts_with("cell_spacing")) {
|
||||
sscanf(line.c_str(), "cell_spacing %d", &cell_spacing_);
|
||||
continue;
|
||||
}
|
||||
if (line.find("row_spacing") == 0) {
|
||||
if (line.starts_with("row_spacing")) {
|
||||
sscanf(line.c_str(), "row_spacing %d", &row_spacing_);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user