Browse Source

Taking the buffer by reference in buffer_exists to avoid counting.

David Piuva 11 months ago
parent
commit
438cfdfcb5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/DFPSR/api/bufferAPI.h

+ 1 - 1
Source/DFPSR/api/bufferAPI.h

@@ -79,7 +79,7 @@ namespace dsr {
 	void buffer_replaceDestructor(const Buffer &buffer, const std::function<void(uint8_t *)>& newDestructor);
 
 	// Returns true iff buffer exists, even if it is empty without any data allocation.
-	inline bool buffer_exists(Buffer buffer) {
+	inline bool buffer_exists(const Buffer &buffer) {
 		return buffer.get() != nullptr;
 	}