Re: passing FXArray by reference
JVZ <[email protected]> Wed, 1 Oct 2025 21:34:26 -0500
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Organization | FOX-Toolkit |
| Message-ID | <20251001213426.174e2cb6@resurgam> |
On Wed, 1 Oct 2025 20:45:02 -0400 "John Selverian" <[email protected]> wrote: >I'm currently passing an FXArray by value. I'd like to pass it by >reference since it is very large but I can't seem to get it >right. void someFunction(FXArray<Test>& by_ref){ ... } or: void someFunction(const FXArray<Test>& by_const_ref){ ... } We also have an alternative: FXArray<Test> oldplace; FXArray<Test> newplace; newplace.adopt(oldplace); This leaves oldplace empty, newplace with the data of the oldplace. This is just a pointer manipulation and should take barely any time at all.... -- JVZ -- +----------------------------------------------------------------------------+ | Copyright (C) 21:30 10/ 1/2025 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+