summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-12-05 20:51:53 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-06 01:40:56 (GMT)
commit631bba964a8b0f58245e5a382cd818628e89598c (patch)
treec5b269c7c745f3a3c6b640dae8a6f7a04cdfb7a7 /src/corelib/thread
parent636210a4ff3f3589fa062ea75869cfad9652cb7c (diff)
downloadQt-631bba964a8b0f58245e5a382cd818628e89598c.zip
Qt-631bba964a8b0f58245e5a382cd818628e89598c.tar.gz
Qt-631bba964a8b0f58245e5a382cd818628e89598c.tar.bz2
Don't use Standard Library routines in qthread_p.h
Just write the for loops by hand so we don't need to use the Standard Library. That's necessary to support a -no-stl build. This patch is not necessary in Qt 5 since Qt 5 does not have -no-stl. Task-number: QTBUG-35424 Change-Id: Id449d807eaf7350f1a668ef16d356a9e236c6058 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_p.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 7c9cfc4..2a15847 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -240,13 +240,21 @@ public:
public:
FlaggedDebugSignatures() : idx(0)
- { std::fill_n(locations, Count, static_cast<char*>(0)); }
+ {
+ for (uint i = 0; i < Count; ++i)
+ locations[i] = 0;
+ }
void store(const char* method)
{ locations[idx++ % Count] = method; }
bool contains(const char *method) const
- { return std::find(locations, locations + Count, method) != locations + Count; }
+ {
+ for (uint i = 0; i < Count; ++i)
+ if (locations[i] == method)
+ return true;
+ return false;
+ }
};
QThread *thread;