This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 2016-12-02 14:05, Pedro Alves wrote:
Seems unnecessarily verbose to me when just doing a simple integer conversion. E.g.:static_cast<int> (foo) + static_cast<int> (bar) + static_cast<int> (qux)vs (int) foo + (int) bar + (int) qux I don't think there's a real advantage.
I agree.
It might be a good idea to check that the resulting integer is smaller than the array size. If we ever add new stop reasons, we could forget to add array elements, so an error() here would catch it.That's highly unlikely, given that if you're adding a new reason, you'll need to be able to parse it from RSP, which requires get_rsp_name.
It seems enough then.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |