diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-27 21:46:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-27 21:46:21 +0300 |
commit | 771f567d1a5cd6e15515b725c3166e1e842b4977 (patch) | |
tree | 911570bfbfea6328ae50c086b380e1733fa96862 | |
parent | ecac1a1ada766b95cef4a1ac7a2ae8280bfbf762 (diff) | |
download | plus-771f567d1a5cd6e15515b725c3166e1e842b4977.tar.gz plus-771f567d1a5cd6e15515b725c3166e1e842b4977.tar.bz2 plus-771f567d1a5cd6e15515b725c3166e1e842b4977.tar.xz plus-771f567d1a5cd6e15515b725c3166e1e842b4977.zip |
Add restrict keyword in graphicsvertexes.
-rw-r--r-- | src/graphicsvertexes.cpp | 28 | ||||
-rw-r--r-- | src/graphicsvertexes.h | 44 |
2 files changed, 36 insertions, 36 deletions
diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp index 9b30f52c5..917c6d6b9 100644 --- a/src/graphicsvertexes.cpp +++ b/src/graphicsvertexes.cpp @@ -70,7 +70,7 @@ OpenGLGraphicsVertexes::~OpenGLGraphicsVertexes() clear(); } -void OpenGLGraphicsVertexes::clear() +void OpenGLGraphicsVertexes::clear() restrict2 { for (std::vector<GLfloat*>::iterator it = mFloatTexPool.begin(); it != mFloatTexPool.end(); ++ it) @@ -122,45 +122,45 @@ void OpenGLGraphicsVertexes::clear() } } -void OpenGLGraphicsVertexes::init() +void OpenGLGraphicsVertexes::init() restrict2 { clear(); } -GLfloat *OpenGLGraphicsVertexes::switchFloatTexArray() +GLfloat *OpenGLGraphicsVertexes::switchFloatTexArray() restrict2 { mFloatTexArray = new GLfloat[static_cast<size_t>(vertexBufSize * 4 + 30)]; mFloatTexPool.push_back(mFloatTexArray); return mFloatTexArray; } -GLint *OpenGLGraphicsVertexes::switchIntVertArray() +GLint *OpenGLGraphicsVertexes::switchIntVertArray() restrict2 { mIntVertArray = new GLint[static_cast<size_t>(vertexBufSize * 4 + 30)]; mIntVertPool.push_back(mIntVertArray); return mIntVertArray; } -GLshort *OpenGLGraphicsVertexes::switchShortVertArray() +GLshort *OpenGLGraphicsVertexes::switchShortVertArray() restrict2 { mShortVertArray = new GLshort[static_cast<size_t>(vertexBufSize * 4 + 30)]; mShortVertPool.push_back(mShortVertArray); return mShortVertArray; } -GLint *OpenGLGraphicsVertexes::switchIntTexArray() +GLint *OpenGLGraphicsVertexes::switchIntTexArray() restrict2 { mIntTexArray = new GLint[static_cast<size_t>(vertexBufSize * 4 + 30)]; mIntTexPool.push_back(mIntTexArray); return mIntTexArray; } -void OpenGLGraphicsVertexes::switchVp(const int n) +void OpenGLGraphicsVertexes::switchVp(const int n) restrict2 { mVp.push_back(n); } -int OpenGLGraphicsVertexes::continueVp() +int OpenGLGraphicsVertexes::continueVp() restrict2 { if (mVp.empty()) { @@ -174,14 +174,14 @@ int OpenGLGraphicsVertexes::continueVp() } } -void OpenGLGraphicsVertexes::updateVp(const int n) +void OpenGLGraphicsVertexes::updateVp(const int n) restrict2 { if (!mVp.empty()) mVp.pop_back(); mVp.push_back(n); } -GLfloat *OpenGLGraphicsVertexes::continueFloatTexArray() +GLfloat *OpenGLGraphicsVertexes::continueFloatTexArray() restrict2 { if (mFloatTexPool.empty()) { @@ -196,7 +196,7 @@ GLfloat *OpenGLGraphicsVertexes::continueFloatTexArray() return mFloatTexArray; } -GLint *OpenGLGraphicsVertexes::continueIntVertArray() +GLint *OpenGLGraphicsVertexes::continueIntVertArray() restrict2 { if (mIntVertPool.empty()) { @@ -210,7 +210,7 @@ GLint *OpenGLGraphicsVertexes::continueIntVertArray() return mIntVertArray; } -GLshort *OpenGLGraphicsVertexes::continueShortVertArray() +GLshort *OpenGLGraphicsVertexes::continueShortVertArray() restrict2 { if (mShortVertPool.empty()) { @@ -225,7 +225,7 @@ GLshort *OpenGLGraphicsVertexes::continueShortVertArray() return mShortVertArray; } -GLint *OpenGLGraphicsVertexes::continueIntTexArray() +GLint *OpenGLGraphicsVertexes::continueIntTexArray() restrict2 { if (mIntTexPool.empty()) { @@ -271,7 +271,7 @@ ImageCollection::~ImageCollection() clear(); } -void ImageCollection::clear() +void ImageCollection::clear() restrict2 { #ifdef USE_OPENGL currentGLImage = 0; diff --git a/src/graphicsvertexes.h b/src/graphicsvertexes.h index 0606ea3b9..0374cf95f 100644 --- a/src/graphicsvertexes.h +++ b/src/graphicsvertexes.h @@ -72,46 +72,46 @@ class OpenGLGraphicsVertexes final ~OpenGLGraphicsVertexes(); - GLfloat *switchFloatTexArray(); + GLfloat *switchFloatTexArray() restrict2; - GLint *switchIntVertArray(); + GLint *switchIntVertArray() restrict2; - GLint *switchIntTexArray(); + GLint *switchIntTexArray() restrict2; - GLshort *switchShortVertArray(); + GLshort *switchShortVertArray() restrict2; - std::vector<GLfloat*> *getFloatTexPool() A_WARN_UNUSED + std::vector<GLfloat*> *getFloatTexPool() restrict2 A_WARN_UNUSED { return &mFloatTexPool; } - std::vector<GLint*> *getIntVertPool() A_WARN_UNUSED + std::vector<GLint*> *getIntVertPool() restrict2 A_WARN_UNUSED { return &mIntVertPool; } - std::vector<GLshort*> *getShortVertPool() A_WARN_UNUSED + std::vector<GLshort*> *getShortVertPool() restrict2 A_WARN_UNUSED { return &mShortVertPool; } - std::vector<GLint*> *getIntTexPool() A_WARN_UNUSED + std::vector<GLint*> *getIntTexPool() restrict2 A_WARN_UNUSED { return &mIntTexPool; } - void switchVp(const int n); + void switchVp(const int n) restrict2; - GLfloat *continueFloatTexArray() RETURNS_NONNULL; + GLfloat *continueFloatTexArray() restrict2 RETURNS_NONNULL; - GLint *continueIntVertArray() RETURNS_NONNULL; + GLint *continueIntVertArray() restrict2 RETURNS_NONNULL; - GLshort *continueShortVertArray() RETURNS_NONNULL; + GLshort *continueShortVertArray() restrict2 RETURNS_NONNULL; - GLint *continueIntTexArray() RETURNS_NONNULL; + GLint *continueIntTexArray() restrict2 RETURNS_NONNULL; - int continueVp(); + int continueVp() restrict2; - void updateVp(const int n); + void updateVp(const int n) restrict2; - std::vector<int> *getVp() A_WARN_UNUSED + std::vector<int> *getVp() restrict2 A_WARN_UNUSED { return &mVp; } - void init(); + void init() restrict2; - void clear(); + void clear() restrict2; int ptr; @@ -139,7 +139,7 @@ class ImageVertexes final ~ImageVertexes(); - const Image *image; + const Image *restrict image; #ifdef USE_OPENGL OpenGLGraphicsVertexes ogl; #endif @@ -159,14 +159,14 @@ class ImageCollection final ~ImageCollection(); - void clear(); + void clear() restrict2; #ifdef USE_OPENGL GLuint currentGLImage; #endif - const Image *currentImage; + const Image *restrict currentImage; - ImageVertexes *currentVert; + ImageVertexes *restrict currentVert; ImageVertexesVector draws; }; |