From e4727a3591c4c4d769d890806b159ade9af3f6aa Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 7 Jun 2016 14:31:29 +0200 Subject: llc: remove NULL-pointer check of gprs_llc_queue::size()/octets() All callers now check the pointer before calling it. gcc6 is optimizing `if (!this) {CODE}` as this is assumed to never be a std::nullptr here. Change-Id: I918a094e0dc59098a9eb00d152c9ae42d36b3a99 --- src/llc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llc.h b/src/llc.h index 94de16ed..48836240 100644 --- a/src/llc.h +++ b/src/llc.h @@ -127,10 +127,10 @@ inline bool gprs_llc::fits_in_current_frame(uint8_t chunk_size) const inline size_t gprs_llc_queue::size() const { - return this ? m_queue_size : 0; + return m_queue_size; } inline size_t gprs_llc_queue::octets() const { - return this ? m_queue_octets : 0; + return m_queue_octets; } -- cgit v1.2.3