Skip to content

Commit

Permalink
buffer: pass attributes as const reference
Browse files Browse the repository at this point in the history
pass attributes as const reference instead of copies.
  • Loading branch information
gulafaran committed Jun 17, 2024
1 parent c9a6832 commit db5ad77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/protocols/types/DMABuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "../../render/Renderer.hpp"
#include "../../helpers/Format.hpp"

CDMABuffer::CDMABuffer(uint32_t id, wl_client* client, SDMABUFAttrs attrs_) : attrs(attrs_) {
CDMABuffer::CDMABuffer(uint32_t id, wl_client* client, SDMABUFAttrs const& attrs_) : attrs(attrs_) {
g_pHyprRenderer->makeEGLCurrent();

listeners.resourceDestroy = events.destroy.registerListener([this](std::any d) {
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/types/DMABuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class CDMABuffer : public IWLBuffer {
public:
CDMABuffer(uint32_t id, wl_client* client, SDMABUFAttrs attrs_);
CDMABuffer(uint32_t id, wl_client* client, SDMABUFAttrs const& attrs_);
virtual ~CDMABuffer();

virtual eBufferCapability caps();
Expand Down

0 comments on commit db5ad77

Please sign in to comment.