summaryrefslogtreecommitdiff
path: root/ndb/include/util/Bitmask.hpp
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2004-07-09 10:00:09 +0200
committerunknown <joreland@mysql.com>2004-07-09 10:00:09 +0200
commit0785d204f73d503c6873f2fbf8ef45a0a66298bc (patch)
tree3b59aba050f8cec0d21996baa1d9c3996d1981e7 /ndb/include/util/Bitmask.hpp
parent6e18271f1c5979a3c337c23c341e75175b1d8b93 (diff)
downloadmariadb-git-0785d204f73d503c6873f2fbf8ef45a0a66298bc.tar.gz
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
Diffstat (limited to 'ndb/include/util/Bitmask.hpp')
-rw-r--r--ndb/include/util/Bitmask.hpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/ndb/include/util/Bitmask.hpp b/ndb/include/util/Bitmask.hpp
index 7355742f845..a670889f3b3 100644
--- a/ndb/include/util/Bitmask.hpp
+++ b/ndb/include/util/Bitmask.hpp
@@ -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));
}