Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-06-06 10:05:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-13 18:47:12 +0400
commitbf462149a6d0213521b12395e10eb91f02c02326 (patch)
tree21fd955fda46046ad8182c33642baceda64cd8fc /source/blender/blenlib/BLI_bitmap.h
parenta427fa5261565746b24c626766b7ffcb83712d3c (diff)
BLI_bitmap: rename macros
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE - BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE - BLI_BITMAP_GET -> BLI_BITMAP_TEST - BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
Diffstat (limited to 'source/blender/blenlib/BLI_bitmap.h')
-rw-r--r--source/blender/blenlib/BLI_bitmap.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h
index cff2b52012c..5431785aa84 100644
--- a/source/blender/blenlib/BLI_bitmap.h
+++ b/source/blender/blenlib/BLI_bitmap.h
@@ -47,7 +47,7 @@ typedef unsigned int BLI_bitmap;
/* size (in bytes) used to hold '_tot' bits */
#define BLI_BITMAP_SIZE(_tot) \
- (_BITMAP_NUM_BLOCKS(_tot) * sizeof(unsigned int))
+ (_BITMAP_NUM_BLOCKS(_tot) * sizeof(BLI_bitmap))
/* allocate memory for a bitmap with '_tot' bits; free
* with MEM_freeN() */
@@ -60,35 +60,35 @@ typedef unsigned int BLI_bitmap;
((BLI_bitmap *)memset(alloca(BLI_BITMAP_SIZE(_tot)), 0, BLI_BITMAP_SIZE(_tot)))
/* get the value of a single bit at '_index' */
-#define BLI_BITMAP_GET(_bitmap, _index) \
+#define BLI_BITMAP_TEST(_bitmap, _index) \
(CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
((_bitmap)[(_index) >> _BITMAP_POWER] & \
(1u << ((_index) & _BITMAP_MASK))))
-#define BLI_BITMAP_GET_BOOL(_bitmap, _index) \
+#define BLI_BITMAP_TEST_BOOL(_bitmap, _index) \
(CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
- (BLI_BITMAP_GET(_bitmap, _index) != 0))
+ (BLI_BITMAP_TEST(_bitmap, _index) != 0))
/* set the value of a single bit at '_index' */
-#define BLI_BITMAP_SET(_bitmap, _index) \
+#define BLI_BITMAP_ENABLE(_bitmap, _index) \
(CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
((_bitmap)[(_index) >> _BITMAP_POWER] |= \
(1u << ((_index) & _BITMAP_MASK))))
/* clear the value of a single bit at '_index' */
-#define BLI_BITMAP_CLEAR(_bitmap, _index) \
+#define BLI_BITMAP_DISABLE(_bitmap, _index) \
(CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
((_bitmap)[(_index) >> _BITMAP_POWER] &= \
~(1u << ((_index) & _BITMAP_MASK))))
/* set or clear the value of a single bit at '_index' */
-#define BLI_BITMAP_MODIFY(_bitmap, _index, _set) \
+#define BLI_BITMAP_SET(_bitmap, _index, _set) \
{ \
CHECK_TYPE(_bitmap, BLI_bitmap *); \
if (_set) \
- BLI_BITMAP_SET(_bitmap, _index); \
+ BLI_BITMAP_ENABLE(_bitmap, _index); \
else \
- BLI_BITMAP_CLEAR(_bitmap, _index); \
+ BLI_BITMAP_DISABLE(_bitmap, _index); \
} (void)0
/* resize bitmap to have space for '_tot' bits */