summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-09-02 10:32:43 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-09-02 20:43:07 +0200
commit5b9e566b4d009ddb79f4c7d7e17ef0b8b4024859 (patch)
treedbfc192f30daa18a0b364a664f7c636b592283aa /tests/auto
parentb04c14429734614fdb7c846a0c319512acee47cd (diff)
QImage: add a qMove()
The color table is passed by value (good for C++11), so when the argument is assigned to the member variable, that's a good spot for a move assignment. However, the argument is also declared const. The standard says that top-level const is ignored, but some compilers (I know about SunCC) think differently, so we cannot remove it. Instead, we do a const_cast. It is well-defined: Even though apparently the argument was declared as const, the standard says the const is not there, and no sane compiler would put the argument copy into read-only memory. Add a reminder to remove the top-level const from the signature come Qt 6. Change-Id: Iac18846ba669de0a30da620685ad1438c267e193 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto')
0 files changed, 0 insertions, 0 deletions