diff options
author | Maurice Kalinowski <maurice.kalinowski@qt.io> | 2016-08-17 13:26:12 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-08-17 14:05:23 +0000 |
commit | 39179d41f0b7278f869f3d746aa276940754875e (patch) | |
tree | 861f3a6679a17d5edcee1a7f6269462e2e719f1c /src/qml/compiler/qv4compilationunitmapper_win.cpp | |
parent | 7101ca92fe9449d4da1b45cf57b9fa62e527b500 (diff) |
Fix return value
CompilationUnitMapper::open is supposed to return a pointer, not bool.
Change-Id: I798be4038b8df047d380201b746f8d97cc1db526
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilationunitmapper_win.cpp')
-rw-r--r-- | src/qml/compiler/qv4compilationunitmapper_win.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compilationunitmapper_win.cpp b/src/qml/compiler/qv4compilationunitmapper_win.cpp index 4361752f93..abf109484b 100644 --- a/src/qml/compiler/qv4compilationunitmapper_win.cpp +++ b/src/qml/compiler/qv4compilationunitmapper_win.cpp @@ -80,7 +80,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co DWORD bytesRead; if (!ReadFile(handle, reinterpret_cast<char *>(&header), sizeof(header), &bytesRead, nullptr)) { *errorString = qt_error_string(GetLastError()); - return false; + return nullptr; } if (bytesRead != sizeof(header)) { @@ -101,7 +101,7 @@ CompiledData::Unit *CompilationUnitMapper::open(const QString &cacheFileName, co HANDLE fileMappingHandle = CreateFileMapping(handle, 0, mappingFlags, 0, 0, 0); if (!fileMappingHandle) { *errorString = qt_error_string(GetLastError()); - return false; + return nullptr; } QDeferredCleanup mappingCleanup([fileMappingHandle]{ |