From 47a80f4217883cbd3c561c4fdd69c8c163aa37e3 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Fri, 28 Aug 2015 21:08:41 +1000 Subject: [PATCH] n/f/runtime: return reference to child on reset --- noise/fractal/runtime.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/noise/fractal/runtime.hpp b/noise/fractal/runtime.hpp index 8cf3b6e1..e54f1e2f 100644 --- a/noise/fractal/runtime.hpp +++ b/noise/fractal/runtime.hpp @@ -149,13 +149,15 @@ namespace util { namespace noise { namespace fractal { public: template - void + F& reset (seed_t _seed) { using fractal_t = F; using child_t = child; - m_child.reset (new child_t (_seed)); + child_t *out; + m_child.reset (out= new child_t (_seed)); + return out->data; } }; } } }