aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 18:34:00 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-22 18:55:26 +0100
commit8603d3262180a2771947801ce1d80cbd5092c989 (patch)
tree85f5265b67dc94b063b320870a8ea8588999593e /ruby
parentf7be9952e67a5cdad6f3531a22654db198e7d106 (diff)
downloadpaludis-8603d3262180a2771947801ce1d80cbd5092c989.tar.gz
paludis-8603d3262180a2771947801ce1d80cbd5092c989.tar.xz
shared_ptr<> no longer implicitly bools
Diffstat (limited to 'ruby')
-rw-r--r--ruby/dep_spec.cc16
-rw-r--r--ruby/repository.cc2
2 files changed, 9 insertions, 9 deletions
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index 668f5b749..689954d29 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -573,7 +573,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->tag())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->tag()))
return Qnil;
return dep_tag_to_value(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->tag());
}
@@ -604,7 +604,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr()))
return Qnil;
return qualified_package_name_to_value(*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_ptr());
}
@@ -620,7 +620,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_name_part_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->package_name_part_ptr()))
return Qnil;
return rb_str_new2(stringify(*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->
package_name_part_ptr()).c_str());
@@ -637,7 +637,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->category_name_part_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->category_name_part_ptr()))
return Qnil;
return rb_str_new2(stringify(*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->
category_name_part_ptr()).c_str());
@@ -769,7 +769,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->slot_requirement_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->slot_requirement_ptr()))
return Qnil;
return slot_requirement_to_value(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->slot_requirement_ptr());
}
@@ -785,7 +785,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr()))
return Qnil;
return rb_str_new2(stringify((*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->in_repository_ptr())).c_str());
}
@@ -801,7 +801,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr()))
return Qnil;
return rb_str_new2(stringify((*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->from_repository_ptr())).c_str());
}
@@ -839,7 +839,7 @@ namespace
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (0 == std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_ptr())
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_ptr()))
return Qnil;
return rb_str_new2(stringify((*std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_ptr())).c_str());
}
diff --git a/ruby/repository.cc b/ruby/repository.cc
index 440df5a45..ff5d09060 100644
--- a/ruby/repository.cc
+++ b/ruby/repository.cc
@@ -701,7 +701,7 @@ VALUE repo_to_value(T_ m, VALUE * klass)
VALUE
paludis::ruby::repository_to_value(std::shared_ptr<Repository> m)
{
- if (0 == m)
+ if (! m)
return Qnil;
else
return repo_to_value<std::shared_ptr<Repository> >(m, &c_repository);