From 47afc4d6fca8d33e3f2895964779dbcc4bd43b03 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 10 May 2018 03:30:32 +0200 Subject: [PATCH] Conversion function to int, which can be used when int is needed to avoid --- src/blackmisc/sequence.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/blackmisc/sequence.h b/src/blackmisc/sequence.h index 2bfe18e75..aa3d95bed 100644 --- a/src/blackmisc/sequence.h +++ b/src/blackmisc/sequence.h @@ -152,6 +152,9 @@ namespace BlackMisc //! Returns number of elements in the sequence. size_type size() const { return m_impl.size(); } + //! Avoid compiler warnings when using with int + int sizeInt() const { return static_cast(this->size()); } + //! Returns true if the sequence is empty. bool empty() const { return m_impl.isEmpty(); }