diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
commit | 2d2d36fe3b2f3e7eed7d05714abc80f1a5a82303 (patch) | |
tree | 7ad54825db128e59312fbf787555fd91edf09a07 /source/blender/blenlib | |
parent | 5d9256404159670bec6d65557697accb5b3111b8 (diff) |
code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/pbvh.c | 5 | ||||
-rw-r--r-- | source/blender/blenlib/intern/string.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 49a6cbcc249..ed3eedb8e10 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1529,7 +1529,7 @@ void BLI_join_dirfile(char *dst, const size_t maxlen, const char *dir, const cha size_t dirlen = BLI_strnlen(dir, maxlen); if (dst != dir) { - if (dirlen == maxlen) { + if (dirlen == maxlen) { memcpy(dst, dir, dirlen); dst[dirlen - 1] = '\0'; return; /* dir fills the path */ diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index fdb0cc0ccc8..f4b57857173 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -406,8 +406,9 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node) /* Build the vertex list, unique verts first */ for (iter = BLI_ghashIterator_new(map), i = 0; - !BLI_ghashIterator_isDone(iter); - BLI_ghashIterator_step(iter), ++i) { + BLI_ghashIterator_isDone(iter) == FALSE; + BLI_ghashIterator_step(iter), ++i) + { void *value = BLI_ghashIterator_getValue(iter); int ndx = GET_INT_FROM_POINTER(value); diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index 53531871aa6..e73899ce929 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -135,7 +135,7 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen) case '\t': case '\n': case '\r': - if (len + 1 < maxlen) { + if (len + 1 < maxlen) { *dst++ = '\\'; len++; } |