@@ -48,13 +48,13 @@ namespace Firebird
48
48
return refCnt;
49
49
}
50
50
51
- void assertNonZero ()
51
+ void assertNonZero () noexcept
52
52
{
53
53
fb_assert (m_refCnt.value () > 0 );
54
54
}
55
55
56
56
protected:
57
- RefCounted () : m_refCnt(0 ) {}
57
+ RefCounted () noexcept : m_refCnt(0 ) {}
58
58
59
59
virtual ~RefCounted ()
60
60
{
@@ -97,7 +97,7 @@ namespace Firebird
97
97
class RefPtr
98
98
{
99
99
public:
100
- RefPtr () : ptr(NULL )
100
+ RefPtr () noexcept : ptr(NULL )
101
101
{ }
102
102
103
103
explicit RefPtr (T* p) : ptr(p)
@@ -110,7 +110,7 @@ namespace Firebird
110
110
111
111
// This special form of ctor is used to create refcounted ptr from interface,
112
112
// 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)
114
114
{ }
115
115
116
116
RefPtr (const RefPtr& r) : ptr(r.ptr)
@@ -158,7 +158,7 @@ namespace Firebird
158
158
}
159
159
}
160
160
161
- T* clear () // nullify pointer w/o calling release
161
+ T* clear () noexcept // nullify pointer w/o calling release
162
162
{
163
163
T* rc = ptr;
164
164
ptr = NULL ;
@@ -181,22 +181,22 @@ namespace Firebird
181
181
return ptr;
182
182
}
183
183
184
- operator T*() const
184
+ operator T*() const noexcept
185
185
{
186
186
return ptr;
187
187
}
188
188
189
- T* operator ->() const
189
+ T* operator ->() const noexcept
190
190
{
191
191
return ptr;
192
192
}
193
193
194
- bool hasData () const
194
+ bool hasData () const noexcept
195
195
{
196
196
return ptr ? true : false ;
197
197
}
198
198
199
- bool operator !() const
199
+ bool operator !() const noexcept
200
200
{
201
201
return !ptr;
202
202
}
@@ -211,12 +211,12 @@ namespace Firebird
211
211
return ptr != r.ptr ;
212
212
}
213
213
214
- T* getPtr ()
214
+ T* getPtr () noexcept
215
215
{
216
216
return ptr;
217
217
}
218
218
219
- const T* getPtr () const
219
+ const T* getPtr () const noexcept
220
220
{
221
221
return ptr;
222
222
}
@@ -254,7 +254,7 @@ namespace Firebird
254
254
}
255
255
256
256
template <typename T>
257
- RefPtr<T> makeNoIncRef (T* arg)
257
+ RefPtr<T> makeNoIncRef (T* arg) noexcept
258
258
{
259
259
return RefPtr<T>(REF_NO_INCR, arg);
260
260
}
0 commit comments