[vte/wip/sixels: 16/82] image: Use assert() instead of g_assert_true()
- From: Hans Petter Jansson <hansp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/sixels: 16/82] image: Use assert() instead of g_assert_true()
- Date: Fri, 26 Jun 2020 00:44:26 +0000 (UTC)
commit cb5407cb06e68c207e339f1434346cba71a64d91
Author: Hans Petter Jansson <hpj cl no>
Date: Sun May 31 23:39:35 2020 +0200
image: Use assert() instead of g_assert_true()
The latter is a C/GLib function and intended for use in tests only. The
C++ code generally relies on assert() instead.
src/image.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/image.cc b/src/image.cc
index 05a1912a..c4d67246 100644
--- a/src/image.cc
+++ b/src/image.cc
@@ -84,7 +84,7 @@ Image::is_frozen() const
bool
Image::includes(const Image *other) const
{
- g_assert_true(other != NULL);
+ assert(other != nullptr);
return other->m_left >= m_left &&
other->m_top >= m_top &&
@@ -164,7 +164,7 @@ Image::combine(Image *other, gulong char_width, gulong char_height)
{
cairo_t *cr;
- g_assert_true(other != NULL);
+ assert(other != nullptr);
gulong offsetx = (other->m_left - m_left) * char_width;
gulong offsety = (other->m_top - m_top) * char_height;
@@ -249,7 +249,7 @@ Image::read_callback(void *closure, char *data, unsigned int length)
{
Image *image = (Image *)closure;
- g_assert_true(image != NULL);
+ assert(image != nullptr);
_vte_stream_read(image->m_stream, image->m_position + image->m_nread, data, length);
image->m_nread += length;
@@ -262,7 +262,7 @@ Image::write_callback(void *closure, const char *data, unsigned int length)
{
Image *image = (Image *)closure;
- g_assert_true (image != NULL);
+ assert(image != nullptr);
_vte_stream_append(image->m_stream, data, length);
image->m_nwrite += length;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]