aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/embind/embind_benchmark.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/embind/embind_benchmark.cpp b/tests/embind/embind_benchmark.cpp
index 91efa4af..4a472686 100644
--- a/tests/embind/embind_benchmark.cpp
+++ b/tests/embind/embind_benchmark.cpp
@@ -66,13 +66,13 @@ public:
Vec3 rot;
float scale;
- Vec3 GetPosition() { return pos; }
- Vec3 GetRotation() { return rot; }
- float GetScale() { return scale; }
+ Vec3 __attribute__((noinline)) GetPosition() const { return pos; }
+ Vec3 __attribute__((noinline)) GetRotation() const { return rot; }
+ float __attribute__((noinline)) GetScale() const { return scale; }
- void SetPosition(const Vec3 &pos_) { pos = pos_; }
- void SetRotation(const Vec3 &rot_) { rot = rot_; }
- void SetScale(float scale_) { scale = scale_; }
+ void __attribute__((noinline)) SetPosition(const Vec3 &pos_) { pos = pos_; }
+ void __attribute__((noinline)) SetRotation(const Vec3 &rot_) { rot = rot_; }
+ void __attribute__((noinline)) SetScale(float scale_) { scale = scale_; }
};
typedef std::shared_ptr<Transform> TransformPtr;
@@ -85,7 +85,7 @@ public:
}
std::shared_ptr<Transform> transform;
- TransformPtr GetTransform() { return transform; }
+ TransformPtr __attribute__((noinline)) GetTransform() const { return transform; }
};
typedef std::shared_ptr<GameObject> GameObjectPtr;