Преглед на файлове

Taking the buffer by reference in buffer_exists to avoid counting.

David Piuva преди 11 месеца
родител
ревизия
438cfdfcb5
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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);
 	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.
 	// 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;
 		return buffer.get() != nullptr;
 	}
 	}