diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/fluid.c | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/delaunay_2d.cc | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/expr_pylike_eval.c | 12 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 6 | ||||
-rw-r--r-- | source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp | 16 | ||||
-rw-r--r-- | source/blender/ikplugin/intern/itasc_plugin.cpp | 16 | ||||
-rw-r--r-- | source/blender/imbuf/intern/dds/Stream.cpp | 14 | ||||
-rw-r--r-- | source/blender/imbuf/intern/dds/Stream.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/radiance_hdr.c | 20 | ||||
-rw-r--r-- | source/blender/io/alembic/intern/abc_customdata.cc | 10 | ||||
-rw-r--r-- | source/blender/io/avi/intern/avi_mjpeg.c | 10 | ||||
-rw-r--r-- | source/blender/sequencer/intern/effects.c | 4 |
15 files changed, 71 insertions, 71 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index ca9d758c692..81e73b6cf2c 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -1754,7 +1754,7 @@ static void update_distances(int index, /* Count ray mesh misses (i.e. no face hit) and cases where the ray direction matches the face * normal direction. From this information it can be derived whether a cell is inside or * outside the mesh. */ - int miss_cnt = 0, dir_cnt = 0; + int miss_count = 0, dir_count = 0; for (int i = 0; i < ARRAY_SIZE(ray_dirs); i++) { BVHTreeRayHit hit_tree = {0}; @@ -1773,14 +1773,14 @@ static void update_distances(int index, /* Ray did not hit mesh. * Current point definitely not inside mesh. Inside mesh as all rays have to hit. */ if (hit_tree.index == -1) { - miss_cnt++; + miss_count++; /* Skip this ray since nothing was hit. */ continue; } /* Ray and normal are pointing in opposite directions. */ if (dot_v3v3(ray_dirs[i], hit_tree.no) <= 0) { - dir_cnt++; + dir_count++; } if (hit_tree.dist < min_dist) { @@ -1790,7 +1790,7 @@ static void update_distances(int index, /* Point lies inside mesh. Use negative sign for distance value. * This "if statement" has 2 conditions that can be true for points outside mesh. */ - if (!(miss_cnt > 0 || dir_cnt == ARRAY_SIZE(ray_dirs))) { + if (!(miss_count > 0 || dir_count == ARRAY_SIZE(ray_dirs))) { min_dist = (-1.0f) * fabsf(min_dist); } diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc index b7dbd7d679c..4a02072e770 100644 --- a/source/blender/blenlib/intern/delaunay_2d.cc +++ b/source/blender/blenlib/intern/delaunay_2d.cc @@ -423,7 +423,7 @@ template<typename T> std::ostream &operator<<(std::ostream &os, const CDT_state< os << " merge to " << vertname(cdt_state.cdt.verts[v->merge_to_index]) << "\n"; } const SymEdge<T> *se = v->symedge; - int cnt = 0; + int count = 0; constexpr int print_count_limit = 25; if (se) { os << " edges out:\n"; @@ -440,8 +440,8 @@ template<typename T> std::ostream &operator<<(std::ostream &os, const CDT_state< os << " " << vertname(vother) << "(e=" << trunc_ptr(se->edge) << ", se=" << trunc_ptr(se) << ")\n"; se = se->rot; - cnt++; - } while (se != v->symedge && cnt < print_count_limit); + count++; + } while (se != v->symedge && count < print_count_limit); os << "\n"; } } diff --git a/source/blender/blenlib/intern/expr_pylike_eval.c b/source/blender/blenlib/intern/expr_pylike_eval.c index db677cd304c..1c32336fee0 100644 --- a/source/blender/blenlib/intern/expr_pylike_eval.c +++ b/source/blender/blenlib/intern/expr_pylike_eval.c @@ -829,18 +829,18 @@ static bool parse_unary(ExprParseState *state) /* Specially supported functions. */ if (STREQ(state->tokenbuf, "min")) { - int cnt = parse_function_args(state); - CHECK_ERROR(cnt > 0); + int count = parse_function_args(state); + CHECK_ERROR(count > 0); - parse_add_op(state, OPCODE_MIN, 1 - cnt)->arg.ival = cnt; + parse_add_op(state, OPCODE_MIN, 1 - count)->arg.ival = count; return true; } if (STREQ(state->tokenbuf, "max")) { - int cnt = parse_function_args(state); - CHECK_ERROR(cnt > 0); + int count = parse_function_args(state); + CHECK_ERROR(count > 0); - parse_add_op(state, OPCODE_MAX, 1 - cnt)->arg.ival = cnt; + parse_add_op(state, OPCODE_MAX, 1 - count)->arg.ival = count; return true; } diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 5790d76936f..be5521d45ab 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -571,7 +571,7 @@ static EdgeHalf *next_bev(BevVert *bv, EdgeHalf *from_e) /* Return the count of edges between e1 and e2 when going around bv CCW. */ static int count_ccw_edges_between(EdgeHalf *e1, EdgeHalf *e2) { - int cnt = 0; + int count = 0; EdgeHalf *e = e1; do { @@ -579,9 +579,9 @@ static int count_ccw_edges_between(EdgeHalf *e1, EdgeHalf *e2) break; } e = e->next; - cnt++; + count++; } while (e != e1); - return cnt; + return count; } /* Assume bme1 and bme2 both share some vert. Do they share a face? diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 1705e36363e..c0bf89107e0 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -792,7 +792,7 @@ static int paint_space_stroke(bContext *C, Paint *paint = BKE_paint_get_active_from_context(C); ePaintMode mode = BKE_paintmode_get_active_from_context(C); Brush *brush = BKE_paint_brush(paint); - int cnt = 0; + int count = 0; const bool use_scene_spacing = paint_stroke_use_scene_spacing(brush, mode); float d_world_space_position[3] = {0.0f}; @@ -855,14 +855,14 @@ static int paint_space_stroke(bContext *C, pressure = stroke->last_pressure; dpressure = final_pressure - stroke->last_pressure; - cnt++; + count++; } else { break; } } - return cnt; + return count; } /**** Public API ****/ diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index dc3b7d9795a..5642a80e77f 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -430,8 +430,8 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, int nSamples = 0; vector<WFace *> wFaces; WFace *wFace = nullptr; - unsigned cnt = 0; - unsigned cntStep = (unsigned)ceil(0.01f * vedges.size()); + unsigned count = 0; + unsigned count_step = (unsigned)ceil(0.01f * vedges.size()); unsigned tmpQI = 0; unsigned qiClasses[256]; unsigned maxIndex, maxCard; @@ -441,13 +441,13 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, if (iRenderMonitor->testBreak()) { break; } - if (cnt % cntStep == 0) { + if (count % count_step == 0) { stringstream ss; - ss << "Freestyle: Visibility computations " << (100 * cnt / vedges.size()) << "%"; + ss << "Freestyle: Visibility computations " << (100 * count / vedges.size()) << "%"; iRenderMonitor->setInfo(ss.str()); - iRenderMonitor->progress((float)cnt / vedges.size()); + iRenderMonitor->progress((float)count / vedges.size()); } - cnt++; + count++; } #if LOGGING if (_global.debug & G_DEBUG_FREESTYLE) { @@ -621,9 +621,9 @@ static void computeCumulativeVisibility(ViewMap *ioViewMap, } if (iRenderMonitor && !vedges.empty()) { stringstream ss; - ss << "Freestyle: Visibility computations " << (100 * cnt / vedges.size()) << "%"; + ss << "Freestyle: Visibility computations " << (100 * count / vedges.size()) << "%"; iRenderMonitor->setInfo(ss.str()); - iRenderMonitor->progress((float)cnt / vedges.size()); + iRenderMonitor->progress((float)count / vedges.size()); } } diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index 470dfb01bdd..b9f7dd98073 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -1512,17 +1512,17 @@ static IK_Scene *convert_tree( iktarget->bldepsgraph = depsgraph; condata = (bKinematicConstraint *)iktarget->blenderConstraint->data; pchan = tree->pchan[iktarget->channel]; - unsigned int controltype, bonecnt; - double bonelen; + unsigned int controltype, bone_count; + double bone_length; float mat[4][4]; /* add the end effector * estimate the average bone length, used to clamp feedback error */ - for (bonecnt = 0, bonelen = 0.0f, a = iktarget->channel; a >= 0; - a = tree->parent[a], bonecnt++) { - bonelen += ikscene->blScale * tree->pchan[a]->bone->length; + for (bone_count = 0, bone_length = 0.0f, a = iktarget->channel; a >= 0; + a = tree->parent[a], bone_count++) { + bone_length += ikscene->blScale * tree->pchan[a]->bone->length; } - bonelen /= bonecnt; + bone_length /= bone_count; /* store the rest pose of the end effector to compute enforce target */ copy_m4_m4(mat, pchan->bone->arm_mat); @@ -1567,7 +1567,7 @@ static IK_Scene *convert_tree( } } if (controltype) { - iktarget->constraint = new iTaSC::CopyPose(controltype, controltype, bonelen); + iktarget->constraint = new iTaSC::CopyPose(controltype, controltype, bone_length); /* set the gain */ if (controltype & iTaSC::CopyPose::CTL_POSITION) { iktarget->constraint->setControlParameter( @@ -1599,7 +1599,7 @@ static IK_Scene *convert_tree( } break; case CONSTRAINT_IK_DISTANCE: - iktarget->constraint = new iTaSC::Distance(bonelen); + iktarget->constraint = new iTaSC::Distance(bone_length); iktarget->constraint->setControlParameter( iTaSC::Distance::ID_DISTANCE, iTaSC::ACT_VALUE, condata->dist); iktarget->constraint->registerCallback(distance_callback, iktarget); diff --git a/source/blender/imbuf/intern/dds/Stream.cpp b/source/blender/imbuf/intern/dds/Stream.cpp index bc7239dbd1b..34f3654aa3f 100644 --- a/source/blender/imbuf/intern/dds/Stream.cpp +++ b/source/blender/imbuf/intern/dds/Stream.cpp @@ -12,14 +12,14 @@ static const char *msg_error_seek = "DDS: trying to seek beyond end of stream (corrupt file?)"; static const char *msg_error_read = "DDS: trying to read beyond end of stream (corrupt file?)"; -inline bool is_read_within_bounds(const Stream &mem, unsigned int cnt) +inline bool is_read_within_bounds(const Stream &mem, unsigned int count) { if (mem.pos >= mem.size) { /* No more data remained in the memory buffer. */ return false; } - if (cnt > mem.size - mem.pos) { + if (count > mem.size - mem.pos) { /* Reading past the memory bounds. */ return false; } @@ -83,15 +83,15 @@ unsigned int mem_read(Stream &mem, unsigned char &i) return 1; } -unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int cnt) +unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int count) { - if (!is_read_within_bounds(mem, cnt)) { + if (!is_read_within_bounds(mem, count)) { mem.set_failed(msg_error_read); return 0; } - memcpy(i, mem.mem + mem.pos, cnt); - mem.pos += cnt; - return cnt; + memcpy(i, mem.mem + mem.pos, count); + mem.pos += count; + return count; } void Stream::set_failed(const char *msg) diff --git a/source/blender/imbuf/intern/dds/Stream.h b/source/blender/imbuf/intern/dds/Stream.h index 3e17b143629..d90440f47cd 100644 --- a/source/blender/imbuf/intern/dds/Stream.h +++ b/source/blender/imbuf/intern/dds/Stream.h @@ -24,4 +24,4 @@ unsigned int mem_read(Stream &mem, unsigned long long &i); unsigned int mem_read(Stream &mem, unsigned int &i); unsigned int mem_read(Stream &mem, unsigned short &i); unsigned int mem_read(Stream &mem, unsigned char &i); -unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int cnt); +unsigned int mem_read(Stream &mem, unsigned char *i, unsigned int count); diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index c1e00642a6d..84bed479577 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -1314,14 +1314,14 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context, short *do_update, float *progress) { - int cnt = IMB_anim_get_duration(context->anim, IMB_TC_NONE); + int count = IMB_anim_get_duration(context->anim, IMB_TC_NONE); int i, pos; struct anim *anim = context->anim; - for (pos = 0; pos < cnt; pos++) { + for (pos = 0; pos < count; pos++) { struct ImBuf *ibuf = IMB_anim_absolute(anim, pos, IMB_TC_NONE, IMB_PROXY_NONE); struct ImBuf *tmp_ibuf = IMB_dupImBuf(ibuf); - float next_progress = (float)pos / (float)cnt; + float next_progress = (float)pos / (float)count; if (*progress != next_progress) { *progress = next_progress; diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 86321d6432c..eb0a2c4a47f 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -105,7 +105,7 @@ static int expandrow2( float *optr, const float *optr_end, const uchar *iptr, const uchar *iptr_end, int z); static void interleaverow(uchar *lptr, const uchar *cptr, int z, int n); static void interleaverow2(float *lptr, const uchar *cptr, int z, int n); -static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int cnt); +static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int row_len); static void lumrow(const uchar *rgbptr, uchar *lumptr, int n); /* @@ -892,7 +892,7 @@ static void lumrow(const uchar *rgbptr, uchar *lumptr, int n) } } -static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int cnt) +static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int row_len) { uchar *iptr, *ibufend, *sptr, *optr; short todo, cc; @@ -900,7 +900,7 @@ static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int cnt) lbuf += z; iptr = lbuf; - ibufend = iptr + cnt * 4; + ibufend = iptr + row_len * 4; optr = rlebuf; while (iptr < ibufend) { diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 3786f1c5754..aa07edf5c3a 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -308,7 +308,7 @@ struct ImBuf *imb_loadhdr(const unsigned char *mem, static int fwritecolrs( FILE *file, int width, int channels, const unsigned char *ibufscan, const float *fpscan) { - int beg, c2, cnt = 0; + int beg, c2, count = 0; fCOLOR fcol; RGBE rgbe, *rgbe_scan; @@ -347,14 +347,14 @@ static int fwritecolrs( putc((unsigned char)(width & 255), file); /* put components separately */ for (size_t i = 0; i < 4; i++) { - for (size_t j = 0; j < width; j += cnt) { /* find next run */ - for (beg = j; beg < width; beg += cnt) { - for (cnt = 1; (cnt < 127) && ((beg + cnt) < width) && - (rgbe_scan[beg + cnt][i] == rgbe_scan[beg][i]); - cnt++) { + for (size_t j = 0; j < width; j += count) { /* find next run */ + for (beg = j; beg < width; beg += count) { + for (count = 1; (count < 127) && ((beg + count) < width) && + (rgbe_scan[beg + count][i] == rgbe_scan[beg][i]); + count++) { /* pass */ } - if (cnt >= MINRUN) { + if (count >= MINRUN) { break; /* long enough */ } } @@ -378,12 +378,12 @@ static int fwritecolrs( putc(rgbe_scan[j++][i], file); } } - if (cnt >= MINRUN) { /* write out run */ - putc((unsigned char)(128 + cnt), file); + if (count >= MINRUN) { /* write out run */ + putc((unsigned char)(128 + count), file); putc(rgbe_scan[beg][i], file); } else { - cnt = 0; + count = 0; } } } diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc index ecb1fa0a752..c413fbf0ff9 100644 --- a/source/blender/io/alembic/intern/abc_customdata.cc +++ b/source/blender/io/alembic/intern/abc_customdata.cc @@ -61,7 +61,7 @@ static void get_uvs(const CDStreamConfig &config, MLoop *mloop = config.mloop; if (!config.pack_uvs) { - int cnt = 0; + int count = 0; uvidx.resize(config.totloop); uvs.resize(config.totloop); @@ -70,12 +70,12 @@ static void get_uvs(const CDStreamConfig &config, MPoly ¤t_poly = polygons[i]; MLoopUV *loopuv = mloopuv_array + current_poly.loopstart + current_poly.totloop; - for (int j = 0; j < current_poly.totloop; j++, cnt++) { + for (int j = 0; j < current_poly.totloop; j++, count++) { loopuv--; - uvidx[cnt] = cnt; - uvs[cnt][0] = loopuv->uv[0]; - uvs[cnt][1] = loopuv->uv[1]; + uvidx[count] = count; + uvs[count][0] = loopuv->uv[0]; + uvs[count][1] = loopuv->uv[1]; } } } diff --git a/source/blender/io/avi/intern/avi_mjpeg.c b/source/blender/io/avi/intern/avi_mjpeg.c index 53366a7b0e3..fb42274fef2 100644 --- a/source/blender/io/avi/intern/avi_mjpeg.c +++ b/source/blender/io/avi/intern/avi_mjpeg.c @@ -525,14 +525,14 @@ static boolean jpegmemsrcmgr_fill_input_buffer(j_decompress_ptr dinfo) return true; } -static void jpegmemsrcmgr_skip_input_data(j_decompress_ptr dinfo, long skipcnt) +static void jpegmemsrcmgr_skip_input_data(j_decompress_ptr dinfo, long skip_count) { - if (dinfo->src->bytes_in_buffer < skipcnt) { - skipcnt = dinfo->src->bytes_in_buffer; + if (dinfo->src->bytes_in_buffer < skip_count) { + skip_count = dinfo->src->bytes_in_buffer; } - dinfo->src->next_input_byte += skipcnt; - dinfo->src->bytes_in_buffer -= skipcnt; + dinfo->src->next_input_byte += skip_count; + dinfo->src->bytes_in_buffer -= skip_count; } static void jpegmemsrcmgr_term_source(j_decompress_ptr dinfo) diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index a77b34ae66d..8f7088b0c4b 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -3737,9 +3737,9 @@ int SEQ_effect_get_num_inputs(int seq_type) { struct SeqEffectHandle rval = get_sequence_effect_impl(seq_type); - int cnt = rval.num_inputs(); + int count = rval.num_inputs(); if (rval.execute || (rval.execute_slice && rval.init_execution)) { - return cnt; + return count; } return 0; } |