From: Mikko Rasa Date: Fri, 29 Oct 2021 09:23:32 +0000 (+0300) Subject: Move Bufferable::refresh_async's definition to the header X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=69f8cd98ee3b78f2e4ee509d30e5e828456ef702;p=libs%2Fgl.git Move Bufferable::refresh_async's definition to the header --- diff --git a/source/core/bufferable.cpp b/source/core/bufferable.cpp index 0a480e25..a0ff06c8 100644 --- a/source/core/bufferable.cpp +++ b/source/core/bufferable.cpp @@ -60,11 +60,6 @@ unsigned Bufferable::get_required_buffer_size() const return last->offset+last->get_data_size(); } -Bufferable::AsyncUpdater *Bufferable::refresh_async() const -{ - return dirty ? new AsyncUpdater(*this) : 0; -} - void Bufferable::unlink_from_buffer() { if(prev_in_buffer) diff --git a/source/core/bufferable.h b/source/core/bufferable.h index c40c891e..f1d52fb3 100644 --- a/source/core/bufferable.h +++ b/source/core/bufferable.h @@ -57,7 +57,7 @@ public: /** Returns an object which can be used to upload data to the buffer using mapped memory. */ - AsyncUpdater *refresh_async() const; + AsyncUpdater *refresh_async() const { return dirty ? new AsyncUpdater(*this) : 0; } private: void unlink_from_buffer();