blenlib: Fix build warning with MSVC
authorRay Molenkamp <github@lazydodo.com>
Sat, 25 May 2019 19:22:25 +0000 (13:22 -0600)
committerRay Molenkamp <github@lazydodo.com>
Sat, 25 May 2019 19:22:25 +0000 (13:22 -0600)
The declaration and implementation of BLI_path_name_at_index were
out of sync leading to build warning

C4028: formal parameter 1/3/4 different from declaration

source/blender/blenlib/intern/path_util.c

index 3bb60a20fc84e4e4007fb2d1e3cecd0f1bc6ea92..61b773f6016b4e972e9c41410f0d7845a79cbd79 100644 (file)
@@ -1855,7 +1855,10 @@ const char *BLI_path_basename(const char *path)
  *
  * Ignores multiple slashes at any point in the path (including start/end).
  */
-bool BLI_path_name_at_index(const char *path, const int index, int *r_offset, int *r_len)
+bool BLI_path_name_at_index(const char *__restrict path,
+                            const int index,
+                            int *__restrict r_offset,
+                            int *__restrict r_len)
 {
   if (index >= 0) {
     int index_step = 0;