#include <cstdint>
#include <type_traits>
+
#include <babeltrace2/babeltrace.h>
#include "common-iter.hpp"
+#include "exc.hpp"
+#include "integer-range.hpp"
#include "internal/borrowed-obj.hpp"
#include "internal/utils.hpp"
-#include "integer-range.hpp"
-#include "lib-error.hpp"
namespace bt2 {
static void put(const bt_integer_range_set_unsigned * const libObjPtr)
{
- bt_integer_range_set_unsigned_get_ref(libObjPtr);
+ bt_integer_range_set_unsigned_put_ref(libObjPtr);
}
};
static void put(const bt_integer_range_set_signed * const libObjPtr)
{
- bt_integer_range_set_signed_get_ref(libObjPtr);
+ bt_integer_range_set_signed_put_ref(libObjPtr);
}
};
}
template <typename OtherLibObjT>
- CommonIntegerRangeSet(const CommonIntegerRangeSet<OtherLibObjT>& rangeSet) noexcept :
+ CommonIntegerRangeSet(const CommonIntegerRangeSet<OtherLibObjT> rangeSet) noexcept :
_ThisBorrowedObj {rangeSet}
{
}
template <typename OtherLibObjT>
_ThisCommonIntegerRangeSet&
- operator=(const CommonIntegerRangeSet<OtherLibObjT>& rangeSet) noexcept
+ operator=(const CommonIntegerRangeSet<OtherLibObjT> rangeSet) noexcept
{
_ThisBorrowedObj::operator=(rangeSet);
return *this;
}
template <typename OtherLibObjT>
- bool operator==(const CommonIntegerRangeSet<OtherLibObjT>& other) const noexcept
+ bool operator==(const CommonIntegerRangeSet<OtherLibObjT> other) const noexcept
{
return _Spec::isEqual(this->libObjPtr(), other.libObjPtr());
}
template <typename OtherLibObjT>
- bool operator!=(const CommonIntegerRangeSet<OtherLibObjT>& other) const noexcept
+ bool operator!=(const CommonIntegerRangeSet<OtherLibObjT> other) const noexcept
{
return !(*this == other);
}
const auto status = _Spec::addRange(this->libObjPtr(), lower, upper);
if (status == BT_INTEGER_RANGE_SET_ADD_RANGE_STATUS_MEMORY_ERROR) {
- throw LibMemoryError {};
+ throw MemoryError {};
}
}