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:
Dodji Seketeli 2014-01-14 13:31:43 +01:00
parent 1b0f6b489a
commit fa48bb97f9
3 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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)