X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Fvector%2Fcl_GV_I.cc;h=dc8aab3224b992dc8a77fa9dee8ea8ab3ae91dc0;hb=3af2cde18b3aabed4c808b0113daa81c2263b0bd;hp=3a54560b446074045eaa4ca2fd154f6e25928bf2;hpb=e47b7b1880e8a0688cdad03ea5e449476bca38ca;p=cln.git diff --git a/src/vector/cl_GV_I.cc b/src/vector/cl_GV_I.cc index 3a54560..dc8aab3 100644 --- a/src/vector/cl_GV_I.cc +++ b/src/vector/cl_GV_I.cc @@ -27,11 +27,7 @@ namespace cln { static void cl_gvector_integer_destructor (cl_heap* pointer) { -#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug - (*(cl_heap_GV_I*)pointer).~cl_heap_GV(); -#else (*(cl_heap_GV_I*)pointer).~cl_heap_GV_I(); -#endif } // XXX: Ugh, this needs to be non-const (and non-static) for overriding @@ -73,9 +69,9 @@ static inline cl_GV_I_vectorops* outcast (cl_GV_vectorops* vectorops) struct cl_heap_GV_I_general : public cl_heap_GV_I { cl_I data[1]; // Standard allocation disabled. - void* operator new (size_t size) { unused size; throw runtime_exception(); } + void* operator new (size_t size) = delete; // Standard deallocation disabled. - void operator delete (void* ptr) { unused ptr; throw runtime_exception(); } + void operator delete (void* ptr) = delete; // No default constructor. cl_heap_GV_I_general (); }; @@ -143,9 +139,9 @@ cl_heap_GV_I* cl_make_heap_GV_I (std::size_t len) struct cl_heap_GV_I_bits##m : public cl_heap_GV_I { \ uint_t data[1]; \ /* Standard allocation disabled. */ \ - void* operator new (size_t size) { unused size; throw runtime_exception(); } \ + void* operator new (size_t size) = delete; \ /* Standard deallocation disabled. */ \ - void operator delete (void* ptr) { unused ptr; throw runtime_exception(); } \ + void operator delete (void* ptr) = delete; \ /* No default constructor. */ \ cl_heap_GV_I_bits##m (); \ }; \ @@ -184,7 +180,7 @@ static cl_GV_I_vectorops bits##m##_vectorops = {{ \ static void bits_do_delete (cl_GV_inner* vec) { - unused vec; + cl_unused vec; } // Copy bits srcptr.bits[srcindex..srcindex+count-1] into destptr.bits[destindex..destindex+count-1].