Lesson learned: use "static inline"

Everything todo with programming goes HERE.
Post Reply
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Lesson learned: use "static inline"

Post by Z-Man »

I had

Code: Select all

inline void clamp(...)
in gCycle.cpp and

Code: Select all

inline bool clamp(...)
in gCycleMovement.cpp; the bool return value should indicate whether clamping was done. Imagine my surprise when I noticed that calls from gCycleMovement.cpp were using the definition from gCycle.cpp, with unpredictable return value obviously. Perfectly according to the specs, of course.

That was the reason for the strange sporadic playback breakdown, by the way, or at least the dominant one.
Post Reply