diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-27 18:37:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-27 18:37:26 +0300 |
commit | 12f2ce912aa1a7e158f06aa20396f213abdd2583 (patch) | |
tree | cd75248717e990fee8b7418df35eb5d27c195336 /src/particle/imageparticle.cpp | |
parent | 3605741892b995144111d4d885cf88063c3f4379 (diff) | |
download | plus-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.gz plus-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.bz2 plus-12f2ce912aa1a7e158f06aa20396f213abdd2583.tar.xz plus-12f2ce912aa1a7e158f06aa20396f213abdd2583.zip |
Add restrict keyword to particle.
Diffstat (limited to 'src/particle/imageparticle.cpp')
-rw-r--r-- | src/particle/imageparticle.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/particle/imageparticle.cpp b/src/particle/imageparticle.cpp index dbef1dd32..484bf53ae 100644 --- a/src/particle/imageparticle.cpp +++ b/src/particle/imageparticle.cpp @@ -30,7 +30,7 @@ StringIntMap ImageParticle::imageParticleCountByName; -ImageParticle::ImageParticle(Image *const image) : +ImageParticle::ImageParticle(Image *restrict const image) : Particle(), mImage(image) { @@ -38,7 +38,7 @@ ImageParticle::ImageParticle(Image *const image) : { mImage->incRef(); - const std::string &name = mImage->getIdPath(); + const std::string &restrict name = mImage->getIdPath(); StringIntMapIter it = ImageParticle::imageParticleCountByName.find(name); if (it == ImageParticle::imageParticleCountByName.end()) @@ -52,7 +52,7 @@ ImageParticle::~ImageParticle() { if (mImage) { - const std::string &name = mImage->getIdPath(); + const std::string &restrict name = mImage->getIdPath(); StringIntMapIter it = ImageParticle::imageParticleCountByName.find(name); if (it != ImageParticle::imageParticleCountByName.end()) @@ -67,8 +67,9 @@ ImageParticle::~ImageParticle() } } -void ImageParticle::draw(Graphics *const graphics, - const int offsetX, const int offsetY) const +void ImageParticle::draw(Graphics *restrict const graphics, + const int offsetX, + const int offsetY) const restrict2 { FUNC_BLOCK("ImageParticle::draw", 1) if (mAlive != ALIVE || !mImage) |