cpp-common/bt2: remove redundant assertions
Remove some redundant BT_ASSERT and BT_ASSERT_DBG.
- Most `as*()` methods call a constructor that does the exact same
check. Some exceptions are field class types that have signed and
unsigned variants, where the base class' assertion does not check the
signedness. Another one is `CommonNullValue::asNull`, where the
`CommonNullValue` constructor does not take a lib object pointer, so
does not do a check.
- Things that end up constructing a `BorrowedObject` don't need to do
a null pointer check, as `BorrowedObject`'s constructor does one.
- `BorrowedObjectIterator::operator*` does not need an assertion on the
length, as `operator[]` of the container is expected to do it (either
directly, or rely on the preconditions in the lib).
Change-Id: I6f11680628607eee11164a2e9d3f9de7fc7468cb
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12052
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.025228 seconds and 4 git commands to generate.