Commit e2cdac08 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

replace C99 designated initializer lists with proper constructors

parent df003d3e
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -34,9 +34,7 @@ void draw_shape(Context* ctx, DrawCommand shape) {
        .width = Number(shape.fill_style.hatch_width),
      });
    } else {
      shape.style.fill_solid.push_back({
        .color = *shape.fill_style.color
      });
      shape.style.fill_solid.emplace_back(*shape.fill_style.color);
    }

    shape.fill_style = {};
+1 −3
Original line number Diff line number Diff line
@@ -31,9 +31,7 @@ Layer::Layer() :
    text_color(Color::fromRGB(0, 0, 0)),
    font_size(from_pt(11)),
    color_palette(color_palette_default()) {
  draw_default_style.fill_solid.push_back({
    .color = Color::fromRGB(0, 0, 0),
  });
  draw_default_style.fill_solid.emplace_back(Color::fromRGB(0, 0, 0));
}

ReturnCode layer_create(
+1 −3
Original line number Diff line number Diff line
@@ -162,9 +162,7 @@ ReturnCode style_read_fill_solid(
    return rc;
  }

  styles->fill_solid.push_back(draw_style::fill_solid {
    .color = color
  });
  styles->fill_solid.emplace_back(color);

  return OK;
}