diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-28 13:41:50 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-04-28 13:57:15 (GMT) |
commit | 98bdb5705119fd71c5de66fb413bfba2257835d3 (patch) | |
tree | 0e1be87e7ee21c597fd21c2e9a4b9db795fa8238 /src/declarative/util/qperformancelog.cpp | |
parent | 1fd67315f52dd59667d940057d97f6f7a5ec20d0 (diff) | |
download | Qt-98bdb5705119fd71c5de66fb413bfba2257835d3.zip Qt-98bdb5705119fd71c5de66fb413bfba2257835d3.tar.gz Qt-98bdb5705119fd71c5de66fb413bfba2257835d3.tar.bz2 |
Coding style refactor, changing 'if(' and 'for(' to 'if (' and 'for ('
Diffstat (limited to 'src/declarative/util/qperformancelog.cpp')
-rw-r--r-- | src/declarative/util/qperformancelog.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/declarative/util/qperformancelog.cpp b/src/declarative/util/qperformancelog.cpp index 52ccc0d..8065f9d 100644 --- a/src/declarative/util/qperformancelog.cpp +++ b/src/declarative/util/qperformancelog.cpp @@ -77,22 +77,22 @@ QPerformanceLog::LogData::LogData(const char *desc) QPerformanceLog::LogMetric::LogMetric(LogData *l, int id, const char *desc) { - if(id < 0) + if (id < 0) qFatal("QPerformanceLog: Invalid log id %d ('%s')", id, desc); QPerformanceLogData *logData = performanceLogData(); QPerformanceLogData::Logs::Iterator logIter = logData->logs.find(l); - if(logIter == logData->logs.end()) + if (logIter == logData->logs.end()) qFatal("QPerformanceLog: Unable to locate log for metric '%s'", desc); QPerformanceLogData::Log &log = *logIter; - if(log.descriptions.contains(id)) + if (log.descriptions.contains(id)) qFatal("QPerformanceLog: Duplicate log metric %d ('%s')", id, desc); log.descriptions.insert(id, desc); - if(log.maxId < id) { + if (log.maxId < id) { log.maxId = id; - if(l->data) delete [] l->data; + if (l->data) delete [] l->data; l->data = new unsigned int[2 * (log.maxId + 1)]; ::memset(l->data, 0, 2 * (log.maxId + 1) * sizeof(unsigned int)); } @@ -107,7 +107,7 @@ static void QPerformanceLog_displayData(const QPerformanceLog::LogData *l, const { qWarning() << pl->logDescription << "performance data"; unsigned int total = 0; - for(QHash<int, const char *>::ConstIterator iter = pl->descriptions.begin(); + for (QHash<int, const char *>::ConstIterator iter = pl->descriptions.begin(); iter != pl->descriptions.end(); ++iter) { @@ -126,7 +126,7 @@ void QPerformanceLog::displayData() { QPerformanceLogData *logData = performanceLogData(); - for(QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin(); + for (QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin(); iter != logData->logs.end(); ++iter) { QPerformanceLog_displayData(iter.key(), &(*iter)); @@ -137,7 +137,7 @@ void QPerformanceLog::clear() { QPerformanceLogData *logData = performanceLogData(); - for(QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin(); + for (QPerformanceLogData::Logs::ConstIterator iter = logData->logs.begin(); iter != logData->logs.end(); ++iter) { QPerformanceLog_clear(iter.key(), &(*iter)); @@ -148,7 +148,7 @@ void QPerformanceLog::displayData(LogData *l) { QPerformanceLogData *logData = performanceLogData(); QPerformanceLogData::Logs::ConstIterator iter = logData->logs.find(l); - if(iter == logData->logs.end()) + if (iter == logData->logs.end()) qFatal("QPerformanceLog: Internal corruption - unable to locate log"); QPerformanceLog_displayData(iter.key(), &(*iter)); @@ -158,7 +158,7 @@ void QPerformanceLog::clear(LogData *l) { QPerformanceLogData *logData = performanceLogData(); QPerformanceLogData::Logs::ConstIterator iter = logData->logs.find(l); - if(iter == logData->logs.end()) + if (iter == logData->logs.end()) qFatal("QPerformanceLog: Internal corruption - unable to locate log"); QPerformanceLog_clear(iter.key(), &(*iter)); |