From 10b8eda20acfc61ca55ba7298b52efcadbfa5ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 23 Feb 2012 02:19:00 +0100 Subject: [PATCH] Inlined functions. --- src/CubeMapTexture.h | 4 ++-- src/Trade/ImageData.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CubeMapTexture.h b/src/CubeMapTexture.h index af2c22607..f9a0d76a6 100644 --- a/src/CubeMapTexture.h +++ b/src/CubeMapTexture.h @@ -102,12 +102,12 @@ class CubeMapTexture: public Texture2D { } private: - void setData(Coordinate coordinate, GLint mipLevel, InternalFormat internalFormat, const Math::Vector& _dimensions, ColorFormat colorFormat, Type type, const void* data) { + inline void setData(Coordinate coordinate, GLint mipLevel, InternalFormat internalFormat, const Math::Vector& _dimensions, ColorFormat colorFormat, Type type, const void* data) { bind(); DataHelper::set(static_cast(coordinate), mipLevel, internalFormat, _dimensions, colorFormat, type, data); } - void setSubData(Coordinate coordinate, GLint mipLevel, const Math::Vector& offset, const Math::Vector& dimensions, ColorFormat colorFormat, Type type, const void* data) { + inline void setSubData(Coordinate coordinate, GLint mipLevel, const Math::Vector& offset, const Math::Vector& dimensions, ColorFormat colorFormat, Type type, const void* data) { bind(); DataHelper::setSub(static_cast(coordinate), mipLevel, offset, dimensions, colorFormat, type, data); } diff --git a/src/Trade/ImageData.h b/src/Trade/ImageData.h index 9a53c413a..1c11a94f1 100644 --- a/src/Trade/ImageData.h +++ b/src/Trade/ImageData.h @@ -48,10 +48,10 @@ template class ImageData { * @attention Note that the image data are not copied on construction, * but they are deleted on class destruction. */ - template ImageData(const Math::Vector& dimensions, AbstractTexture::ColorFormat colorFormat, const T* data): _dimensions(dimensions), _colorFormat(colorFormat), _type(TypeTraits::TextureType>::glType()), _data(reinterpret_cast(data)) {} + template inline ImageData(const Math::Vector& dimensions, AbstractTexture::ColorFormat colorFormat, const T* data): _dimensions(dimensions), _colorFormat(colorFormat), _type(TypeTraits::TextureType>::glType()), _data(reinterpret_cast(data)) {} /** @brief Destructor */ - virtual ~ImageData() { delete[] _data; } + inline virtual ~ImageData() { delete[] _data; } /** @brief %Image dimensions */ inline const Math::Vector& dimensions() const { return _dimensions; } @@ -60,7 +60,7 @@ template class ImageData { inline AbstractTexture::ColorFormat colorFormat() const { return _colorFormat; } /** @brief Data type */ - Type type() const { return _type; } + inline Type type() const { return _type; } /** @brief Pointer to raw data */ inline const void* data() const { return _data; }