@@ -48,13 +48,13 @@ namespace Firebird
4848 return refCnt;
4949 }
5050
51- void assertNonZero ()
51+ void assertNonZero () noexcept
5252 {
5353 fb_assert (m_refCnt.value () > 0 );
5454 }
5555
5656 protected:
57- RefCounted () : m_refCnt(0 ) {}
57+ RefCounted () noexcept : m_refCnt(0 ) {}
5858
5959 virtual ~RefCounted ()
6060 {
@@ -97,7 +97,7 @@ namespace Firebird
9797 class RefPtr
9898 {
9999 public:
100- RefPtr () : ptr(NULL )
100+ RefPtr () noexcept : ptr(NULL )
101101 { }
102102
103103 explicit RefPtr (T* p) : ptr(p)
@@ -110,7 +110,7 @@ namespace Firebird
110110
111111 // This special form of ctor is used to create refcounted ptr from interface,
112112 // returned by a function (which increments counter on return)
113- RefPtr (NoIncrement x, T* p) : ptr(p)
113+ RefPtr (NoIncrement x, T* p) noexcept : ptr(p)
114114 { }
115115
116116 RefPtr (const RefPtr& r) : ptr(r.ptr)
@@ -158,7 +158,7 @@ namespace Firebird
158158 }
159159 }
160160
161- T* clear () // nullify pointer w/o calling release
161+ T* clear () noexcept // nullify pointer w/o calling release
162162 {
163163 T* rc = ptr;
164164 ptr = NULL ;
@@ -181,22 +181,22 @@ namespace Firebird
181181 return ptr;
182182 }
183183
184- operator T*() const
184+ operator T*() const noexcept
185185 {
186186 return ptr;
187187 }
188188
189- T* operator ->() const
189+ T* operator ->() const noexcept
190190 {
191191 return ptr;
192192 }
193193
194- bool hasData () const
194+ bool hasData () const noexcept
195195 {
196196 return ptr ? true : false ;
197197 }
198198
199- bool operator !() const
199+ bool operator !() const noexcept
200200 {
201201 return !ptr;
202202 }
@@ -211,12 +211,12 @@ namespace Firebird
211211 return ptr != r.ptr ;
212212 }
213213
214- T* getPtr ()
214+ T* getPtr () noexcept
215215 {
216216 return ptr;
217217 }
218218
219- const T* getPtr () const
219+ const T* getPtr () const noexcept
220220 {
221221 return ptr;
222222 }
@@ -254,7 +254,7 @@ namespace Firebird
254254 }
255255
256256 template <typename T>
257- RefPtr<T> makeNoIncRef (T* arg)
257+ RefPtr<T> makeNoIncRef (T* arg) noexcept
258258 {
259259 return RefPtr<T>(REF_NO_INCR, arg);
260260 }
0 commit comments