mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Removed some macros
and moved some code. Improve portability ndb/include/kernel/signaldata/SignalData.hpp: Removed macros ndb/include/mgmcommon/MgmtErrorReporter.hpp: Removed macros ndb/include/util/Bitmask.hpp: Removed macros ndb/src/common/debugger/SignalLoggerManager.cpp: Moved printSegmented to src/kernel/vm ndb/src/kernel/Main.cpp: Removed macros ndb/src/kernel/blocks/dbtux/Dbtux.hpp: Removed macros ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp: Removed macros ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp: Removed macros ndb/src/kernel/blocks/ndbfs/Pool.hpp: Removed macros ndb/src/kernel/error/ErrorReporter.hpp: Removed macros ndb/src/kernel/vm/MetaData.cpp: Removed macros ndb/src/kernel/vm/SimulatedBlock.cpp: Removed macros ndb/src/kernel/vm/SimulatedBlock.hpp: Removed macros ndb/src/kernel/vm/TransporterCallback.cpp: Moved printSegmented to src/kernel/vm ndb/src/mgmclient/CommandInterpreter.cpp: Removed macros ndb/src/mgmsrv/MgmtSrvr.cpp: Removed macros ndb/src/ndbapi/TransporterFacade.cpp: Removed macros
This commit is contained in:
@ -19,11 +19,6 @@
|
||||
|
||||
#include <ndb_global.h>
|
||||
|
||||
#ifndef NDB_ASSERT
|
||||
#define NDB_ASSERT(x, s) \
|
||||
do { if (!(x)) { printf("%s\n", s); abort(); } } while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Bitmask implementation. Size is given explicitly
|
||||
* (as first argument). All methods are static.
|
||||
@ -140,7 +135,7 @@ public:
|
||||
inline bool
|
||||
BitmaskImpl::get(unsigned size, const Uint32 data[], unsigned n)
|
||||
{
|
||||
NDB_ASSERT(n < (size << 5), "bit get out of range");
|
||||
assert(n < (size << 5));
|
||||
return (data[n >> 5] & (1 << (n & 31))) != 0;
|
||||
}
|
||||
|
||||
@ -153,7 +148,7 @@ BitmaskImpl::set(unsigned size, Uint32 data[], unsigned n, bool value)
|
||||
inline void
|
||||
BitmaskImpl::set(unsigned size, Uint32 data[], unsigned n)
|
||||
{
|
||||
NDB_ASSERT(n < (size << 5), "bit set out of range");
|
||||
assert(n < (size << 5));
|
||||
data[n >> 5] |= (1 << (n & 31));
|
||||
}
|
||||
|
||||
@ -176,7 +171,7 @@ BitmaskImpl::assign(unsigned size, Uint32 dst[], const Uint32 src[])
|
||||
inline void
|
||||
BitmaskImpl::clear(unsigned size, Uint32 data[], unsigned n)
|
||||
{
|
||||
NDB_ASSERT(n < (size << 5), "bit clear out of range");
|
||||
assert(n < (size << 5));
|
||||
data[n >> 5] &= ~(1 << (n & 31));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user