Sign in
ara-mdk
/
platform
/
ndk
/
6fbccb00602cd0bc3538ef4e3c37b8de5d79a0b0
/
.
/
tests
/
device
/
test-gnustl-full
/
unit
/
fib.h
blob: 9c740384bc158fab79a5cd1fd1777ad795da6f61 [
file
] [
log
] [
blame
]
#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