Replacing pointers with references for output parameters



Some things like Gtk::SpinButton::signal_input() still take pointers in order to write output parameters. In this case, there's a double* new_value, which users must write back to with the converted value represented by whatever string was typed in: *new_value = get_value(blah)

It would be cleaner C++ to implement such arguments as out references instead. Is there a reason this was not doing the first time around, or can we move towards it now?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]