Skip to content

Commit 92a5153

Browse files
committed
update
1 parent 7885a09 commit 92a5153

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

src/ruis/render/opengl/factory.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,15 @@ utki::shared_ref<ruis::render::vertex_buffer> factory::create_vertex_buffer(utki
197197

198198
utki::shared_ref<ruis::render::vertex_array> factory::create_vertex_array(
199199
std::vector<utki::shared_ref<const ruis::render::vertex_buffer>> buffers,
200-
const utki::shared_ref<const ruis::render::index_buffer>& indices,
200+
utki::shared_ref<const ruis::render::index_buffer> indices,
201201
ruis::render::vertex_array::mode mode
202202
)
203203
{
204-
return utki::make_shared<vertex_array>(std::move(buffers), indices, mode);
204+
return utki::make_shared<vertex_array>(
205+
std::move(buffers), //
206+
std::move(indices),
207+
mode
208+
);
205209
}
206210

207211
utki::shared_ref<ruis::render::index_buffer> factory::create_index_buffer(utki::span<const uint16_t> indices)

src/ruis/render/opengl/factory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class factory : public ruis::render::factory
8181
utki::shared_ref<ruis::render::index_buffer> create_index_buffer(utki::span<const uint32_t> indices) override;
8282
utki::shared_ref<ruis::render::vertex_array> create_vertex_array(
8383
std::vector<utki::shared_ref<const ruis::render::vertex_buffer>> buffers,
84-
const utki::shared_ref<const ruis::render::index_buffer>& indices,
84+
utki::shared_ref<const ruis::render::index_buffer> indices,
8585
ruis::render::vertex_array::mode mode
8686
) override;
8787

src/ruis/render/opengl/vertex_array.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ using namespace ruis::render::opengl;
2929

3030
vertex_array::vertex_array(
3131
buffers_type buffers,
32-
const utki::shared_ref<const ruis::render::index_buffer>& indices,
32+
utki::shared_ref<const ruis::render::index_buffer> indices,
3333
mode rendering_mode
3434
) :
35-
ruis::render::vertex_array(std::move(buffers), indices, rendering_mode),
35+
ruis::render::vertex_array(
36+
std::move(buffers), //
37+
std::move(indices),
38+
rendering_mode
39+
),
3640
vao([]() {
3741
if (GLEW_ARB_vertex_array_object) {
3842
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)

src/ruis/render/opengl/vertex_array.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ class vertex_array : public ruis::render::vertex_array
3131
public:
3232
const GLuint vao;
3333

34-
vertex_array(
35-
buffers_type buffers,
36-
const utki::shared_ref<const ruis::render::index_buffer>& indices,
37-
mode rendering_mode
38-
);
34+
vertex_array(buffers_type buffers, utki::shared_ref<const ruis::render::index_buffer> indices, mode rendering_mode);
3935

4036
vertex_array(const vertex_array&) = delete;
4137
vertex_array& operator=(const vertex_array&) = delete;

0 commit comments

Comments
 (0)