mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-05 14:18:11 +00:00
Misc style fixes
* src/abg-reader.cc (read_context::{get_cur_decl, pop_decl}): Return decl_base_sptr rather than shared_ptr<decl_base>. (read_context::push_decl): Take a decl_base_sptr rather than shared_ptr<decl_base>. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
1b0f6b489a
commit
fa48bb97f9
@ -742,8 +742,7 @@ operator()(const shared_ptr<class_tdecl> t) const
|
||||
///
|
||||
/// @return the resulting hash
|
||||
size_t
|
||||
type_base::dynamic_hash::
|
||||
operator()(const type_base* t) const
|
||||
type_base::dynamic_hash::operator()(const type_base* t) const
|
||||
{
|
||||
if (t == 0)
|
||||
return 0;
|
||||
|
@ -175,7 +175,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
shared_ptr<decl_base>
|
||||
decl_base_sptr
|
||||
get_cur_decl() const
|
||||
{
|
||||
if (m_decls_stack.empty())
|
||||
@ -198,16 +198,16 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
push_decl(shared_ptr<decl_base> d)
|
||||
push_decl(decl_base_sptr d)
|
||||
{
|
||||
m_decls_stack.push(d);
|
||||
}
|
||||
|
||||
shared_ptr<decl_base>
|
||||
decl_base_sptr
|
||||
pop_decl()
|
||||
{
|
||||
if (m_decls_stack.empty())
|
||||
return shared_ptr<decl_base>(static_cast<decl_base*>(0));
|
||||
return decl_base_sptr();
|
||||
|
||||
shared_ptr<decl_base> t = get_cur_decl();
|
||||
m_decls_stack.pop();
|
||||
|
@ -765,7 +765,8 @@ write_translation_unit(const translation_unit& tu,
|
||||
///
|
||||
/// @return true upon successful completion, false otherwise.
|
||||
static bool
|
||||
write_type_decl(const shared_ptr<type_decl> d, write_context& ctxt,
|
||||
write_type_decl(const type_decl_sptr d,
|
||||
write_context& ctxt,
|
||||
unsigned indent)
|
||||
{
|
||||
if (!d)
|
||||
|
Loading…
Reference in New Issue
Block a user