tdf#135098 update SwTableCursor m_SelectedBoxes before merge
[LibreOffice.git] / external / firebird / c++17.patch
blobf5ac666bad16b7888d49ab935e28745978732c06
1 --- src/common/DynamicStrings.cpp
2 +++ src/common/DynamicStrings.cpp
3 @@ -37,7 +37,7 @@
5 namespace Firebird {
7 -unsigned makeDynamicStrings(unsigned length, ISC_STATUS* const dst, const ISC_STATUS* const src) throw(BadAlloc)
8 +unsigned makeDynamicStrings(unsigned length, ISC_STATUS* const dst, const ISC_STATUS* const src)
10 const ISC_STATUS* end = &src[length];
12 --- src/common/DynamicStrings.h
13 +++ src/common/DynamicStrings.h
14 @@ -34,7 +34,7 @@
16 namespace Firebird {
18 -unsigned makeDynamicStrings(unsigned len, ISC_STATUS* const dst, const ISC_STATUS* const src) throw(BadAlloc);
19 +unsigned makeDynamicStrings(unsigned len, ISC_STATUS* const dst, const ISC_STATUS* const src);
20 char* findDynamicStrings(unsigned len, ISC_STATUS* ptr) throw();
22 } // namespace Firebird
23 --- src/common/StatusArg.cpp
24 +++ src/common/StatusArg.cpp
25 @@ -53,7 +53,7 @@
27 namespace Arg {
29 -Base::Base(ISC_STATUS k, ISC_STATUS c) throw(Firebird::BadAlloc) :
30 +Base::Base(ISC_STATUS k, ISC_STATUS c) :
31 implementation(FB_NEW_POOL(*getDefaultMemoryPool()) ImplBase(k, c))
34 @@ -94,28 +94,28 @@
35 assign(ex);
38 -StatusVector::StatusVector(ISC_STATUS k, ISC_STATUS c) throw(Firebird::BadAlloc) :
39 +StatusVector::StatusVector(ISC_STATUS k, ISC_STATUS c) :
40 Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(k, c))
42 operator<<(*(static_cast<Base*>(this)));
45 -StatusVector::StatusVector(const ISC_STATUS* s) throw(Firebird::BadAlloc) :
46 +StatusVector::StatusVector(const ISC_STATUS* s) :
47 Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(s))
51 -StatusVector::StatusVector(const IStatus* s) throw(Firebird::BadAlloc) :
52 +StatusVector::StatusVector(const IStatus* s) :
53 Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(s))
57 -StatusVector::StatusVector(const Exception& ex) throw(Firebird::BadAlloc) :
58 +StatusVector::StatusVector(const Exception& ex) :
59 Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(ex))
63 -StatusVector::StatusVector() throw(Firebird::BadAlloc) :
64 +StatusVector::StatusVector() :
65 Base(FB_NEW_POOL(*getDefaultMemoryPool()) ImplStatusVector(0, 0))
68 --- src/common/StatusArg.h
69 +++ src/common/StatusArg.h
70 @@ -86,7 +86,7 @@
71 virtual ~ImplBase() { }
74 - Base(ISC_STATUS k, ISC_STATUS c) throw(Firebird::BadAlloc);
75 + Base(ISC_STATUS k, ISC_STATUS c);
76 explicit Base(ImplBase* i) throw() : implementation(i) { }
77 ~Base() throw() { delete implementation; }
79 @@ -142,13 +142,13 @@
80 explicit ImplStatusVector(const Exception& ex) throw();
83 - StatusVector(ISC_STATUS k, ISC_STATUS v) throw(Firebird::BadAlloc);
84 + StatusVector(ISC_STATUS k, ISC_STATUS v);
86 public:
87 - explicit StatusVector(const ISC_STATUS* s) throw(Firebird::BadAlloc);
88 - explicit StatusVector(const IStatus* s) throw(Firebird::BadAlloc);
89 - explicit StatusVector(const Exception& ex) throw(Firebird::BadAlloc);
90 - StatusVector() throw(Firebird::BadAlloc);
91 + explicit StatusVector(const ISC_STATUS* s);
92 + explicit StatusVector(const IStatus* s);
93 + explicit StatusVector(const Exception& ex);
94 + StatusVector();
95 ~StatusVector() { }
97 const ISC_STATUS* value() const throw() { return implementation->value(); }
98 --- src/common/classes/alloc.cpp
99 +++ src/common/classes/alloc.cpp
100 @@ -1431,7 +1431,7 @@
102 ~FreeObjects();
104 - FreeObjPtr allocateBlock(MemPool* pool, size_t from, size_t& size) throw (OOM_EXCEPTION)
105 + FreeObjPtr allocateBlock(MemPool* pool, size_t from, size_t& size)
107 size_t full_size = size + (from ? 0 : ListBuilder::MEM_OVERHEAD);
108 if (full_size > Limits::TOP_LIMIT)
109 @@ -1498,7 +1498,7 @@
110 ListBuilder listBuilder;
111 Extent* currentExtent;
113 - MemBlock* newBlock(MemPool* pool, unsigned slot) throw (OOM_EXCEPTION);
114 + MemBlock* newBlock(MemPool* pool, unsigned slot);
118 @@ -1538,26 +1538,26 @@
119 AtomicCounter used_memory, mapped_memory;
121 private:
122 - MemBlock* alloc(size_t from, size_t& length, bool flagRedirect) throw (OOM_EXCEPTION);
123 + MemBlock* alloc(size_t from, size_t& length, bool flagRedirect);
124 void releaseBlock(MemBlock *block) throw ();
126 public:
127 - void* allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION);
128 - MemBlock* allocate2(size_t from, size_t& size ALLOC_PARAMS) throw (OOM_EXCEPTION);
129 + void* allocate(size_t size ALLOC_PARAMS);
130 + MemBlock* allocate2(size_t from, size_t& size ALLOC_PARAMS);
132 private:
133 - virtual void memoryIsExhausted(void) throw (OOM_EXCEPTION);
134 - void* allocRaw(size_t length) throw (OOM_EXCEPTION);
135 + virtual void memoryIsExhausted(void);
136 + void* allocRaw(size_t length);
137 static void release(void* block, bool flagDecr) throw ();
138 static void releaseRaw(bool destroying, void *block, size_t size, bool use_cache = true) throw ();
139 - void* getExtent(size_t from, size_t& to) throw (OOM_EXCEPTION);
140 + void* getExtent(size_t from, size_t& to);
142 public:
143 static void releaseExtent(bool destroying, void *block, size_t size, MemPool* pool) throw ();
145 // pass desired size, return actual extent size
146 template <class Extent>
147 - void newExtent(size_t& size, Extent** linkedList) throw (OOM_EXCEPTION);
148 + void newExtent(size_t& size, Extent** linkedList);
150 private:
151 #ifdef USE_VALGRIND
152 @@ -1667,7 +1667,7 @@
155 template <class ListBuilder, class Limits>
156 -MemBlock* FreeObjects<ListBuilder, Limits>::newBlock(MemPool* pool, unsigned slot) throw (OOM_EXCEPTION)
157 +MemBlock* FreeObjects<ListBuilder, Limits>::newBlock(MemPool* pool, unsigned slot)
159 size_t size = Limits::getSize(slot);
161 @@ -1902,7 +1902,7 @@
164 template <class Extent>
165 -void MemPool::newExtent(size_t& size, Extent** linkedList) throw(OOM_EXCEPTION)
166 +void MemPool::newExtent(size_t& size, Extent** linkedList)
168 // No large enough block found. We need to extend the pool
169 void* memory = NULL;
170 @@ -1967,7 +1967,7 @@
171 pool->setStatsGroup(newStats);
174 -MemBlock* MemPool::alloc(size_t from, size_t& length, bool flagRedirect) throw (OOM_EXCEPTION)
175 +MemBlock* MemPool::alloc(size_t from, size_t& length, bool flagRedirect)
177 MutexEnsureUnlock guard(mutex, "MemPool::alloc");
178 guard.enter();
179 @@ -2026,7 +2026,7 @@
180 #ifdef DEBUG_GDS_ALLOC
181 , const char* fileName, int line
182 #endif
183 -) throw (OOM_EXCEPTION)
186 size_t length = from ? size : ROUNDUP(size + VALGRIND_REDZONE, roundingSize) + GUARD_BYTES;
187 MemBlock* memory = alloc(from, length, true);
188 @@ -2055,7 +2055,7 @@
192 -void* MemPool::allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION)
193 +void* MemPool::allocate(size_t size ALLOC_PARAMS)
195 MemBlock* memory = allocate2(0, size ALLOC_PASS_ARGS);
197 @@ -2180,12 +2180,12 @@
198 releaseRaw(pool_destroying, hunk, hunk->length, false);
201 -void MemPool::memoryIsExhausted(void) throw (OOM_EXCEPTION)
202 +void MemPool::memoryIsExhausted(void)
204 Firebird::BadAlloc::raise();
207 -void* MemPool::allocRaw(size_t size) throw (OOM_EXCEPTION)
208 +void* MemPool::allocRaw(size_t size)
210 #ifndef USE_VALGRIND
211 if (size == DEFAULT_ALLOCATION)
212 @@ -2245,7 +2245,7 @@
216 -void* MemPool::getExtent(size_t from, size_t& to) throw(OOM_EXCEPTION) // pass desired minimum size, return actual extent size
217 +void* MemPool::getExtent(size_t from, size_t& to) // pass desired minimum size, return actual extent size
219 MemBlock* extent = allocate2(from, to ALLOC_ARGS);
220 return &extent->body;
221 @@ -2348,7 +2348,7 @@
222 deallocate(block);
225 -void* MemoryPool::calloc(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION)
226 +void* MemoryPool::calloc(size_t size ALLOC_PARAMS)
228 void* block = allocate(size ALLOC_PASS_ARGS);
229 memset(block, 0, size);
230 @@ -2489,7 +2489,7 @@
231 MemPool::globalFree(block);
234 -void* MemoryPool::allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION)
235 +void* MemoryPool::allocate(size_t size ALLOC_PARAMS)
237 return pool->allocate(size ALLOC_PASS_ARGS);
239 @@ -2547,11 +2547,11 @@
240 // in a case when we actually need "new" only with file/line information
241 // this version should be also present as a pair for "delete".
242 #ifdef DEBUG_GDS_ALLOC
243 -void* operator new(size_t s) throw (OOM_EXCEPTION)
244 +void* operator new(size_t s)
246 return MemoryPool::globalAlloc(s ALLOC_ARGS);
248 -void* operator new[](size_t s) throw (OOM_EXCEPTION)
249 +void* operator new[](size_t s)
251 return MemoryPool::globalAlloc(s ALLOC_ARGS);
253 --- src/common/classes/alloc.h
254 +++ src/common/classes/alloc.h
255 @@ -186,18 +186,18 @@
256 #define ALLOC_PASS_ARGS
257 #endif // DEBUG_GDS_ALLOC
259 - void* calloc(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION);
260 + void* calloc(size_t size ALLOC_PARAMS);
262 #ifdef LIBC_CALLS_NEW
263 static void* globalAlloc(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION);
264 #else
265 - static void* globalAlloc(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
266 + static void* globalAlloc(size_t s ALLOC_PARAMS)
268 return defaultMemoryManager->allocate(s ALLOC_PASS_ARGS);
270 #endif // LIBC_CALLS_NEW
272 - void* allocate(size_t size ALLOC_PARAMS) throw (OOM_EXCEPTION);
273 + void* allocate(size_t size ALLOC_PARAMS);
275 static void globalFree(void* mem) throw ();
276 void deallocate(void* mem) throw ();
277 @@ -295,20 +295,20 @@
279 // operators new and delete
281 -inline void* operator new(size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
282 +inline void* operator new(size_t s ALLOC_PARAMS)
284 return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
286 -inline void* operator new[](size_t s ALLOC_PARAMS) throw (OOM_EXCEPTION)
287 +inline void* operator new[](size_t s ALLOC_PARAMS)
289 return MemoryPool::globalAlloc(s ALLOC_PASS_ARGS);
292 -inline void* operator new(size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) throw (OOM_EXCEPTION)
293 +inline void* operator new(size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS)
295 return pool.allocate(s ALLOC_PASS_ARGS);
297 -inline void* operator new[](size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS) throw (OOM_EXCEPTION)
298 +inline void* operator new[](size_t s, Firebird::MemoryPool& pool ALLOC_PARAMS)
300 return pool.allocate(s ALLOC_PASS_ARGS);