mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-12 12:16:04 +08:00
857dfb92de
While playing with some code creating target_waitstatus objects, I was mildly annoyed by the fact that we can't just return a new target_waitstatus object. We have to do: target_waitstatus ws; ws.set_exited (123); return ws; Make the setters return the "this" object as a reference, such that it's possible to do: return target_waitstatus ().set_exited (123); I initially thought of adding static creation functions, which you would use like: return target_waitstatus::make_exited (123); However, making the setters return a reference to the object achieves pretty much the same thing, with less new code. Change-Id: I45159b7f9fcd9db5b20603480e323020b14ed147 |
||
---|---|---|
.. | ||
resume.h | ||
target.h | ||
wait.h | ||
waitstatus.c | ||
waitstatus.h |