reactos/lib/3rdparty/stlport/test/unit/fib.h
Cameron Gutman c2d0d784c7 [USB-BRINGUP-TRUNK]
- Create a branch to do a proper merge of USB work from a trunk base instead of from cmake-bringup
- In the future, DO NOT under any circumstances branch another branch. This leads to merge problems!

svn path=/branches/usb-bringup-trunk/; revision=55018
2012-01-20 20:58:46 +00:00

22 lines
269 B
C++

#ifndef _fib_h
#define _fib_h
class Fibonacci
{
public:
Fibonacci() : v1(0), v2(1) {}
inline int operator()();
private:
int v1;
int v2;
};
inline int
Fibonacci::operator()()
{
int r = v1 + v2;
v1 = v2;
v2 = r;
return v1;
}
#endif // _fib_h