repos
/
benchmark
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
initial import
Annotate for file overload.cpp
2009-05-25 tobias
1
#include "benchmark.h"
14:59:32 '
2
'
3
#include <QObject>
'
4
#include <QMetaObject>
'
5
'
6
class my_object : public QObject
'
7
{
'
8
public:
'
9
virtual const QMetaObject*
'
10
metaObject() const
'
11
{ return NULL; }
'
12
};
'
13
'
14
extern "C" {
'
15
'
16
CL_SMOKE_BENCHMARK_EXPORT unsigned
'
17
cl_smoke_benchmark_overload(size_t iterations)
'
18
{
'
19
my_object object;
'
20
QObject& o = object;
'
21
unsigned m = 0;
'
22
'
23
for (size_t i=0; i<iterations; i++)
'
24
m += reinterpret_cast<unsigned>(o.metaObject());
'
25
'
26
return m;
'
27
}
'
28
'
29
} // extern "C"