remove the pointer from BLI_bitmap's typedef,

hides that an arg passed is really an array which may be modified by other functions.
This commit is contained in:
2013-07-22 23:20:48 +00:00
parent b7bf20d950
commit 04ea8c0ee8
17 changed files with 58 additions and 58 deletions

View File

@@ -105,15 +105,15 @@ void multires_customdata_delete(Mesh *me)
}
/** Grid hiding **/
static BLI_bitmap multires_mdisps_upsample_hidden(BLI_bitmap lo_hidden,
int lo_level,
int hi_level,
static BLI_bitmap *multires_mdisps_upsample_hidden(BLI_bitmap *lo_hidden,
int lo_level,
int hi_level,
/* assumed to be at hi_level (or
* null) */
BLI_bitmap prev_hidden)
/* assumed to be at hi_level (or
* null) */
BLI_bitmap *prev_hidden)
{
BLI_bitmap subd;
BLI_bitmap *subd;
int hi_gridsize = ccg_gridsize(hi_level);
int lo_gridsize = ccg_gridsize(lo_level);
int yh, xh, xl, yl, xo, yo, hi_ndx;
@@ -168,11 +168,11 @@ static BLI_bitmap multires_mdisps_upsample_hidden(BLI_bitmap lo_hidden,
return subd;
}
static BLI_bitmap multires_mdisps_downsample_hidden(BLI_bitmap old_hidden,
int old_level,
int new_level)
static BLI_bitmap *multires_mdisps_downsample_hidden(BLI_bitmap *old_hidden,
int old_level,
int new_level)
{
BLI_bitmap new_hidden;
BLI_bitmap *new_hidden;
int new_gridsize = ccg_gridsize(new_level);
int old_gridsize = ccg_gridsize(old_level);
int x, y, factor, old_value;
@@ -200,7 +200,7 @@ static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
Mesh *me, int level)
{
const MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
BLI_bitmap *grid_hidden = ccgdm->gridHidden;
BLI_bitmap **grid_hidden = ccgdm->gridHidden;
int *gridOffset;
int i, j;
@@ -210,7 +210,7 @@ static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
for (j = 0; j < me->mpoly[i].totloop; j++) {
int g = gridOffset[i] + j;
const MDisps *md = &mdisps[g];
BLI_bitmap gh = md->hidden;
BLI_bitmap *gh = md->hidden;
if (gh) {
grid_hidden[g] =
@@ -224,7 +224,7 @@ static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
* the current level of md.hidden) */
static void multires_mdisps_subdivide_hidden(MDisps *md, int new_level)
{
BLI_bitmap subd;
BLI_bitmap *subd;
BLI_assert(md->hidden);
@@ -647,7 +647,7 @@ static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl)
multires_copy_grid(ndisps, hdisps, nsize, hsize);
if (mdisp->hidden) {
BLI_bitmap gh =
BLI_bitmap *gh =
multires_mdisps_downsample_hidden(mdisp->hidden,
mdisp->level,
lvl);
@@ -1251,7 +1251,7 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm)
void multires_modifier_update_hidden(DerivedMesh *dm)
{
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
BLI_bitmap *grid_hidden = ccgdm->gridHidden;
BLI_bitmap **grid_hidden = ccgdm->gridHidden;
Mesh *me = ccgdm->multires.ob->data;
MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
int totlvl = ccgdm->multires.totlvl;
@@ -1262,7 +1262,7 @@ void multires_modifier_update_hidden(DerivedMesh *dm)
for (i = 0; i < me->totloop; i++) {
MDisps *md = &mdisps[i];
BLI_bitmap gh = grid_hidden[i];
BLI_bitmap *gh = grid_hidden[i];
if (!gh && md->hidden) {
MEM_freeN(md->hidden);