Timeline for Reading and writing binary data in C++
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 6, 2014 at 19:47 | comment | added | glampert | Yes, a const ref would be better for the current code. But in the scenario I've used to exemplify, converting from one data type to another would require a temp, which cannot be returned by ref. | |
| Jul 6, 2014 at 19:44 | comment | added | Jamal |
I would avoid getters/setters if possible. Otherwise, getters can return a const& to prevent modifications.
|
|
| Jul 6, 2014 at 19:40 | history | answered | glampert | CC BY-SA 3.0 |