analyzer: const fixes [PR98679]
gcc/analyzer/ChangeLog: PR analyzer/98679 * analyzer.h (region_offset::operator==): Make const. * pending-diagnostic.h (pending_diagnostic::equal_p): Likewise. * store.h (binding_cluster::for_each_value): Likewise. (binding_cluster::for_each_binding): Likewise.
This commit is contained in:
parent
f6ffd449e0
commit
8a18261afd
@ -169,7 +169,7 @@ public:
|
||||
return m_offset;
|
||||
}
|
||||
|
||||
bool operator== (const region_offset &other)
|
||||
bool operator== (const region_offset &other) const
|
||||
{
|
||||
return (m_base_region == other.m_base_region
|
||||
&& m_offset == other.m_offset
|
||||
|
@ -157,7 +157,7 @@ class pending_diagnostic
|
||||
/* Compare for equality with OTHER, which might be of a different
|
||||
subclass. */
|
||||
|
||||
bool equal_p (const pending_diagnostic &other)
|
||||
bool equal_p (const pending_diagnostic &other) const
|
||||
{
|
||||
/* Check for pointer equality on the IDs from get_kind. */
|
||||
if (get_kind () != other.get_kind ())
|
||||
|
@ -425,7 +425,7 @@ public:
|
||||
|
||||
template <typename T>
|
||||
void for_each_value (void (*cb) (const svalue *sval, T user_data),
|
||||
T user_data)
|
||||
T user_data) const
|
||||
{
|
||||
for (map_t::iterator iter = m_map.begin (); iter != m_map.end (); ++iter)
|
||||
cb ((*iter).second, user_data);
|
||||
@ -459,7 +459,7 @@ public:
|
||||
const svalue *maybe_get_simple_value (store_manager *mgr) const;
|
||||
|
||||
template <typename BindingVisitor>
|
||||
void for_each_binding (BindingVisitor &v)
|
||||
void for_each_binding (BindingVisitor &v) const
|
||||
{
|
||||
for (map_t::iterator iter = m_map.begin (); iter != m_map.end (); ++iter)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user