From 420a50feeacf34e497cc490519e2145fb1c6a8b8 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 20 Jan 2019 16:55:09 +0100 Subject: [PATCH] Function inlining test. --- test/test.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test.cpp b/test/test.cpp index 6a8582ec..d353da5b 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -145,11 +145,18 @@ void MessageTest() } } +static int Fibonacci( int n ); + +static inline int FibonacciInline( int n ) +{ + return Fibonacci( n ); +} + static int Fibonacci( int n ) { ZoneScoped; if( n < 2 ) return n; - return Fibonacci( n-1 ) + Fibonacci( n-2 ); + return FibonacciInline( n-1 ) + FibonacciInline( n-2 ); } void DepthTest()