aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-06-03 11:23:25 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-06-03 13:24:07 +0000
commit4018a91d2f17f4c8d0fe17a788fdd8453b386606 (patch)
tree20b157be3848d491754066125b2461f53e31f509 /src/qml/compiler/qv4compileddata.cpp
parent23ec4ac8ba5450b79dbef857f0062bfb068e98d3 (diff)
Minor const cleanup
The unit data of QV4::CompiledData::CompilationUnit is read-only, which we should "enforce" with a const, especially as in the future it may come from a read-only mmap'ed chunk of memory. Change-Id: I58dde9fe2494d3cfa52cdc9f612c7fa90b98aa26 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 0f81e8b0d9..6cb462cda3 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -82,7 +82,7 @@ CompilationUnit::~CompilationUnit()
{
unlink();
if (data && !(data->flags & QV4::CompiledData::Unit::StaticData))
- free(data);
+ free(const_cast<Unit *>(data));
data = 0;
}