[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64858] Don't do static_cast before type check
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #64858] Don't do static_cast before type check in pt-bytecode.vm.cc |
Date: |
Sun, 5 Nov 2023 05:03:02 -0500 (EST) |
Follow-up Comment #2, bug #64858 (project octave):
@arungiridhar: Did you mean `dynamic_cast`? `reinterpret_cast` doesn't look
right if the object that `ovb` points to can be of a different class.
If ovb always points to a single object of type `octave_cached_value` if
`is_defined ()` returns true, then Petter's change looks good to me. (But I
might be missing something.)
Minor nit: Octave's style guide is to use a space between the type and `*` for
pointers. I.e., `static_cast<octave_cached_value *>` instead of
`static_cast<octave_cached_value*>`.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64858>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/