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>2019-08-14 16:29:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-14 16:32:24 +0300
commit03b2371387dcae9f801cabbc1819b1d7e3350829 (patch)
tree0300655f20a06a8e5c807b5fe6263b47c686dedb /source/blender/blenkernel/intern/pointcache.c
parentbc4fe45aef7e52f9e7a2bd5e370c6791c58af832 (diff)
Cleanup: move trailing comments to avoid wrapping code
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 2d42406520d..13d0f1adb84 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2073,10 +2073,9 @@ static int ptcache_path(PTCacheID *pid, char *filename)
file[i - 6] = '\0';
}
- BLI_snprintf(filename,
- MAX_PTCACHE_PATH,
- "//" PTCACHE_PATH "%s",
- file); /* add blend file name to pointcache dir */
+ /* Add blend file name to pointcache dir. */
+ BLI_snprintf(filename, MAX_PTCACHE_PATH, "//" PTCACHE_PATH "%s", file);
+
BLI_path_abs(filename, blendfilename);
return BLI_add_slash(filename); /* new strlen() */
}
@@ -2130,24 +2129,17 @@ static int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_p
if (pid->cache->flag & PTCACHE_EXTERNAL) {
if (pid->cache->index >= 0) {
- BLI_snprintf(newname,
- MAX_PTCACHE_FILE,
- "_%06d_%02u%s",
- cfra,
- pid->stack_index,
- ext); /* always 6 chars */
+ /* Always 6 chars. */
+ BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02u%s", cfra, pid->stack_index, ext);
}
else {
- BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d%s", cfra, ext); /* always 6 chars */
+ /* Always 6 chars. */
+ BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d%s", cfra, ext);
}
}
else {
- BLI_snprintf(newname,
- MAX_PTCACHE_FILE,
- "_%06d_%02u%s",
- cfra,
- pid->stack_index,
- ext); /* always 6 chars */
+ /* Always 6 chars. */
+ BLI_snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02u%s", cfra, pid->stack_index, ext);
}
len += 16;
}
@@ -2178,8 +2170,9 @@ static PTCacheFile *ptcache_file_open(PTCacheID *pid, int mode, int cfra)
fp = BLI_fopen(filename, "rb");
}
else if (mode == PTCACHE_FILE_WRITE) {
- BLI_make_existing_file(
- filename); /* will create the dir if needs be, same as //textures is created */
+ /* Will create the dir if needs be, same as "//textures" is created. */
+ BLI_make_existing_file(filename);
+
fp = BLI_fopen(filename, "wb");
}
else if (mode == PTCACHE_FILE_UPDATE) {