diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-20 07:46:51 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-19 12:51:06 -0700 |
commit | 0d1912950e35ff6555d12c0baa983acc006c3cf0 (patch) | |
tree | da40715cada37627b7c1d943cb251c30585a14fa /gdb/block.c | |
parent | b32797e8b99b53d4cdd22a4e649792146b219adc (diff) | |
download | gdb-0d1912950e35ff6555d12c0baa983acc006c3cf0.zip gdb-0d1912950e35ff6555d12c0baa983acc006c3cf0.tar.gz gdb-0d1912950e35ff6555d12c0baa983acc006c3cf0.tar.bz2 |
Convert contained_in to method
This converts contained_in to be a method of block.
Diffstat (limited to 'gdb/block.c')
-rw-r--r-- | gdb/block.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/block.c b/gdb/block.c index 334d818..4e40247 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -65,15 +65,14 @@ block::gdbarch () const /* See block.h. */ bool -contained_in (const struct block *a, const struct block *b, - bool allow_nested) +block::contains (const struct block *a, bool allow_nested) const { - if (!a || !b) + if (a == nullptr) return false; do { - if (a == b) + if (a == this) return true; /* If A is a function block, then A cannot be contained in B, except if A was inlined. */ |