POV-Ray : Newsgroups : povray.off-topic : You lose some... : Re: Some code Server Time
7 Sep 2024 03:22:01 EDT (-0400)
  Re: Some code  
From: Orchid XP v8
Date: 5 Oct 2008 08:59:19
Message: <48e8ba27$1@news.povray.org>
Slime wrote:

> If you're 
> not worried about copying Trees around, you can just remove the & from the 
> return type.

Changing this single character makes my program work as intended. Yay me!

I guess the efficient thing to do would be to have the caller allocate 
an empty tree and pass it in by reference and mutate that... Hmm, but 
how to be sure the tree passed in is empty? I guess I could just add 
another assert() for that...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.