From 7be255156feb7636a5cca5c4fe78f42879ffe69b Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 6 Apr 2012 16:34:19 +0200 Subject: Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents. Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo Reviewed-by: John Brooks Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll --- tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp') diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp index 5eaf8b1b2c..47c40032c3 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -400,7 +400,7 @@ bool tst_QFileSystemModel::createFiles(const QString &test_path, const QStringLi if (initial_files.at(i)[0] == '.') { QString hiddenFile = QDir::toNativeSeparators(file.fileName()); wchar_t nativeHiddenFile[MAX_PATH]; - qMemSet(nativeHiddenFile, 0, sizeof(nativeHiddenFile)); + memset(nativeHiddenFile, 0, sizeof(nativeHiddenFile)); hiddenFile.toWCharArray(nativeHiddenFile); DWORD currentAttributes = ::GetFileAttributes(nativeHiddenFile); if (currentAttributes == 0xFFFFFFFF) { -- cgit v1.2.3