summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp')
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index 05d5f94e3d..75b17df759 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -56,10 +56,11 @@
#define STRINGPREP_BIDI_LEADTRAIL_NOT_RAL 5
struct ushortarray {
- ushortarray(unsigned short *array = 0)
+ ushortarray() {}
+ template <size_t N>
+ ushortarray(unsigned short (&array)[N])
{
- if (array)
- memcpy(points, array, sizeof(points));
+ memcpy(points, array, N*sizeof(unsigned short));
}
unsigned short points[100];