Collapsed the add_layer method.

This commit is contained in:
Joseph Lenox 2018-07-21 18:49:49 -05:00
parent 7f3e00f581
commit ac1152f42d

View File

@ -171,9 +171,8 @@ PrintObject::clear_layers()
Layer*
PrintObject::add_layer(int id, coordf_t height, coordf_t print_z, coordf_t slice_z)
{
Layer* layer = new Layer(id, this, height, print_z, slice_z);
layers.push_back(layer);
return layer;
layers.emplace_back(new Layer(id, this, height, print_z, slice_z));
return layers.back();
}
void