testStelVertexArray.cpp   testStelVertexArray.cpp 
skipping to change at line 45 skipping to change at line 45
Vec2f t(i, i); Vec2f t(i, i);
textureCoords.append(t); textureCoords.append(t);
} }
array = StelVertexArray(vertices, StelVertexArray::TriangleStrip, te xtureCoords); array = StelVertexArray(vertices, StelVertexArray::TriangleStrip, te xtureCoords);
} }
struct EmptyVisitor struct EmptyVisitor
{ {
inline void operator()(const Vec3d* , const Vec3d* , const Vec3d* , inline void operator()(const Vec3d* , const Vec3d* , const Vec3d* ,
const Vec2f* , const Vec2 const Vec2f* , const Vec2f* , const Vec2f* ,
f* , const Vec2f* , const Vec3f* , const Vec3f* , const Vec3f* ,
unsigned int , unsigned i unsigned int, unsigned int , unsigned int )
nt , unsigned int )
{ {
} }
}; };
void TestStelVertexArray::benchmarkForeachTriangleNoOp() void TestStelVertexArray::benchmarkForeachTriangleNoOp()
{ {
QBENCHMARK { QBENCHMARK {
array.foreachTriangle(EmptyVisitor()); array.foreachTriangle(EmptyVisitor());
} }
} }
struct VerticesVisitor struct VerticesVisitor
{ {
VerticesVisitor(const VerticesVisitor& rst) : sum(rst.sum) {} VerticesVisitor(const VerticesVisitor& rst) : sum(rst.sum) {}
VerticesVisitor() : sum(0, 0, 0) {} VerticesVisitor() : sum(0, 0, 0) {}
inline void operator()(const Vec3d* , const Vec3d* v1, const Vec3d* v2, inline void operator()(const Vec3d* , const Vec3d* v1, const Vec3d* v2,
const Vec2f* , const Vec2 const Vec2f* , const Vec2f* , const Vec2f* ,
f* , const Vec2f* , const Vec3f* , const Vec3f* , const Vec3f* ,
unsigned int , unsigned i unsigned int , unsigned int , unsigned int )
nt , unsigned int )
{ {
sum += *v1 + *v2; sum += *v1 + *v2;
} }
Vec3d sum; Vec3d sum;
}; };
void TestStelVertexArray::benchmarkForeachTriangle() void TestStelVertexArray::benchmarkForeachTriangle()
{ {
Vec3d sum(0, 0, 0); Vec3d sum(0, 0, 0);
 End of changes. 2 change blocks. 
8 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/