[Bf-blender-cvs] [7decb9ad080] master: Cleanup: rename BLI_appdir_fonts_* -> font

Campbell Barton noreply at git.blender.org
Sun May 19 07:06:01 CEST 2019


Commit: 7decb9ad080eef002c6093581d486727836dbbf0
Author: Campbell Barton
Date:   Sun May 19 14:50:02 2019 +1000
Branches: master
https://developer.blender.org/rB7decb9ad080eef002c6093581d486727836dbbf0

Cleanup: rename BLI_appdir_fonts_* -> font

Plural name doesn't fit with textures, sounds & other paths
that may be added.

Also quiet unused warning.

===================================================================

M	source/blender/blenkernel/BKE_appdir.h
M	source/blender/blenkernel/intern/appdir.c
M	source/blender/blenloader/intern/versioning_defaults.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_appdir.h b/source/blender/blenkernel/BKE_appdir.h
index 7d7a16f6702..e55cb69a5c6 100644
--- a/source/blender/blenkernel/BKE_appdir.h
+++ b/source/blender/blenkernel/BKE_appdir.h
@@ -45,8 +45,8 @@ void BKE_appdir_program_path_init(const char *argv0);
 const char *BKE_appdir_program_path(void);
 const char *BKE_appdir_program_dir(void);
 
-/* return OS fonts directory */
-bool BKE_appdir_fonts_folder_default(char *dir);
+/* Return OS fonts directory. */
+bool BKE_appdir_font_folder_default(char *dir);
 
 /* find python executable */
 bool BKE_appdir_program_python_search(char *fullpath,
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
index 5c4c7066d64..14a20689db0 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -1027,7 +1027,7 @@ void BKE_tempdir_session_purge(void)
 }
 
 /* Gets a good default directory for fonts */
-bool BKE_appdir_fonts_folder_default(char *dir)
+bool BKE_appdir_font_folder_default(char *dir)
 {
   bool success = false;
 #ifdef WIN32
@@ -1035,6 +1035,7 @@ bool BKE_appdir_fonts_folder_default(char *dir)
   success = SHGetSpecialFolderPathW(0, wpath, CSIDL_FONTS, 0);
   BLI_strncpy_wchar_as_utf8(dir, wpath, FILE_MAXDIR);
 #endif
-  /* TODO: Values for other OSs */
+  /* TODO: Values for other platforms. */
+  UNUSED_VARS(dir);
   return success;
 }
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 604974e5075..d43bf020f7d 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -94,8 +94,8 @@ void BLO_update_defaults_userpref_blend(void)
   /* Leave temp directory empty, will then get appropriate value per OS. */
   U.tempdir[0] = '\0';
 
-  /* System-specific fonts directory */
-  BKE_appdir_fonts_folder_default(U.fontdir);
+  /* System-specific fonts directory. */
+  BKE_appdir_font_folder_default(U.fontdir);
 
   /* Only enable tooltips translation by default,
    * without actually enabling translation itself, for now. */



More information about the Bf-blender-cvs mailing list