Cleanup: back-tick quote literal strings in code comments
Prevent doxygen attempting to interpret symbols withing the text. The `make check_spelling_*` target also skips this text.
This commit is contained in:
@@ -65,7 +65,7 @@ void BKE_packedfile_pack_all_libraries(Main *bmain, ReportList *reports);
|
||||
* It returns a char *to the existing file name / new file name or NULL when
|
||||
* there was an error or when the user decides to cancel the operation.
|
||||
*
|
||||
* \warning 'abs_name' may be relative still! (use a "//" prefix)
|
||||
* \warning 'abs_name' may be relative still! (use a `//` prefix)
|
||||
* be sure to run #BLI_path_abs on it first.
|
||||
*/
|
||||
char *BKE_packedfile_unpack_to_file(ReportList *reports,
|
||||
|
||||
@@ -103,9 +103,9 @@ namespace blender::bke::path_templates {
|
||||
*
|
||||
* A filepath variable can contain either a full or partial filepath. The
|
||||
* distinction between string and filepath variables exists because non-path
|
||||
* strings may include phrases like "and/or" or "A:Left", which shouldn't be
|
||||
* strings may include phrases like `and/or` or `A:Left`, which shouldn't be
|
||||
* interpreted with path semantics. When used in path templating, the contents
|
||||
* of string variables are therefore sanitized (replacing "/", etc.), but the
|
||||
* of string variables are therefore sanitized (replacing `/`, etc.), but the
|
||||
* contents of filepath variables are left as-is.
|
||||
*/
|
||||
class VariableMap {
|
||||
@@ -210,8 +210,8 @@ class VariableMap {
|
||||
/**
|
||||
* Add the filename (sans file extension) from the given path as a variable.
|
||||
*
|
||||
* For example, if the full path is "/home/bob/project_joe/scene_3.blend",
|
||||
* then "scene_3" is the value of the added variable.
|
||||
* For example, if the full path is `/home/bob/project_joe/scene_3.blend`,
|
||||
* then `scene_3` is the value of the added variable.
|
||||
*
|
||||
* If the path doesn't contain a filename, then `fallback` is used for the
|
||||
* variable value.
|
||||
@@ -229,8 +229,8 @@ class VariableMap {
|
||||
/**
|
||||
* Add the path up-to-but-not-including the filename as a variable.
|
||||
*
|
||||
* For example, if the full path is "/home/bob/project_joe/scene_3.blend",
|
||||
* then "/home/bob/project_joe/" is the value of the added variable.
|
||||
* For example, if the full path is `/home/bob/project_joe/scene_3.blend`,
|
||||
* then `/home/bob/project_joe/` is the value of the added variable.
|
||||
*
|
||||
* If the path lacks either a filename or a path leading up to that filename,
|
||||
* then `fallback` is used for the variable value.
|
||||
@@ -370,9 +370,9 @@ blender::Vector<blender::bke::path_templates::Error> BKE_path_validate_template(
|
||||
* - `##.###`: format as a float with at least 2 integer-part digits (padded
|
||||
* with zeros as necessary) and precisely 3 fractional-part digits.
|
||||
*
|
||||
* This function also processes a simple escape sequence for writing literal "{"
|
||||
* and "}": like Python format strings, double braces "{{" and "}}" are treated
|
||||
* as escape sequences for "{" and "}", and are substituted appropriately. Note
|
||||
* This function also processes a simple escape sequence for writing literal `{`
|
||||
* and `}`: like Python format strings, double braces `{{` and `}}` are treated
|
||||
* as escape sequences for `{` and `}`, and are substituted appropriately. Note
|
||||
* that this substitution only happens *outside* of the variable syntax, and
|
||||
* therefore cannot e.g. be used inside variable names.
|
||||
*
|
||||
@@ -413,7 +413,7 @@ void BKE_report_path_template_errors(ReportList *reports,
|
||||
|
||||
/**
|
||||
* Format the given floating point value with the provided format specifier. The format specifier
|
||||
* is e.g. the "##.###" in "{name:##.###}".
|
||||
* is e.g. the `##.###` in `{name:##.###}`.
|
||||
*
|
||||
* \return #std::nullopt if the format specifier is invalid.
|
||||
*/
|
||||
|
||||
@@ -147,7 +147,7 @@ static bool lib_id_library_local_paths_callback(BPathForeachPathData *bpath_data
|
||||
if (BLI_path_abs(filepath, base_old)) {
|
||||
/* Path was relative and is now absolute. Remap.
|
||||
* Important BLI_path_normalize runs before the path is made relative
|
||||
* because it won't work for paths that start with "//../" */
|
||||
* because it won't work for paths that start with `//../` */
|
||||
BLI_path_normalize(filepath);
|
||||
BLI_path_rel(filepath, base_new);
|
||||
BLI_strncpy(path_dst, filepath, path_dst_maxncpy);
|
||||
|
||||
@@ -280,9 +280,9 @@ void BKE_add_template_variables_general(VariableMap &variables, const ID *path_o
|
||||
variables.add_filename_only(
|
||||
"blend_name", g_blend_file_path, blender::StringRef(DATA_("Unsaved")));
|
||||
|
||||
/* Note: fallback to "./" for unsaved files, which if used at the start of a
|
||||
/* Note: fallback to `./` for unsaved files, which if used at the start of a
|
||||
* path is equivalent to the current working directory. This is consistent
|
||||
* with how "//" works. */
|
||||
* with how `//` works. */
|
||||
variables.add_path_up_to_file("blend_dir", g_blend_file_path, blender::StringRef("./"));
|
||||
}
|
||||
|
||||
@@ -292,9 +292,9 @@ void BKE_add_template_variables_general(VariableMap &variables, const ID *path_o
|
||||
variables.add_filename_only(
|
||||
"blend_name_lib", lib_blend_file_path, blender::StringRef(DATA_("Unsaved")));
|
||||
|
||||
/* Note: fallback to "./" for unsaved files, which if used at the start of a
|
||||
/* Note: fallback to `./` for unsaved files, which if used at the start of a
|
||||
* path is equivalent to the current working directory. This is consistent
|
||||
* with how "//" works. */
|
||||
* with how `//` works. */
|
||||
variables.add_path_up_to_file("blend_dir_lib", lib_blend_file_path, blender::StringRef("./"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ void BLI_path_normalize_unc(char *path, int path_maxncpy);
|
||||
* This is intended for system paths (passed in as command-line arguments of via scripts)
|
||||
* which are valid in that they resolve to a file/directory and but could be `CWD` relative or
|
||||
* contain redundant slashes that cause absolute/relative conversion to fail.
|
||||
* (specifically the "//" prefix used by Blender).
|
||||
* (specifically the `//` prefix used by Blender).
|
||||
*
|
||||
* Perform the following operations:
|
||||
*
|
||||
@@ -669,24 +669,24 @@ bool BLI_path_frame_check_chars(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If path begins with "//", strips that and replaces it with `basepath` directory.
|
||||
* If path begins with `//`, strips that and replaces it with `basepath` directory.
|
||||
*
|
||||
* \note Also converts drive-letter prefix to something more sensible
|
||||
* if this is a non-drive-letter-based system.
|
||||
*
|
||||
* \param path: The path to convert.
|
||||
* \param basepath: The directory to base relative paths with.
|
||||
* \return true if the path was relative (started with "//").
|
||||
* \return true if the path was relative (started with `//`).
|
||||
*/
|
||||
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1, 2);
|
||||
/**
|
||||
* Replaces `path` with a relative version (prefixed by "//") such that #BLI_path_abs, given
|
||||
* Replaces `path` with a relative version (prefixed by `//`) such that #BLI_path_abs, given
|
||||
* the same `basepath`, will convert it back to its original value.
|
||||
*/
|
||||
void BLI_path_rel(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1);
|
||||
|
||||
/**
|
||||
* Does path begin with the special "//" prefix that Blender uses to indicate
|
||||
* Does path begin with the special `//` prefix that Blender uses to indicate
|
||||
* a path relative to the .blend file.
|
||||
*/
|
||||
bool BLI_path_is_rel(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
|
||||
@@ -698,7 +698,7 @@ bool BLI_path_is_rel(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* Checks for a relative path (ignoring Blender's "//") prefix
|
||||
* Checks for a relative path (ignoring Blender's `//`) prefix
|
||||
* (unlike `!BLI_path_is_rel(path)`).
|
||||
* When false, #BLI_path_abs_from_cwd would expand the absolute path.
|
||||
*/
|
||||
@@ -708,7 +708,7 @@ bool BLI_path_is_abs_from_cwd(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED
|
||||
* \returns true if the expansion was performed.
|
||||
*
|
||||
* \note Should only be called with command line paths.
|
||||
* This is _not_ something Blender's internal paths support, instead they use the "//" prefix.
|
||||
* This is _not_ something Blender's internal paths support, instead they use the `//` prefix.
|
||||
* In most cases #BLI_path_abs should be used instead.
|
||||
*/
|
||||
bool BLI_path_abs_from_cwd(char *path, size_t path_maxncpy) ATTR_NONNULL(1);
|
||||
|
||||
@@ -1898,7 +1898,7 @@ bool BLI_path_contains(const char *container_path, const char *containee_path)
|
||||
}
|
||||
|
||||
/* Add a trailing slash to prevent same-prefix directories from matching.
|
||||
* e.g. "/some/path" doesn't contain "/some/path_lib". */
|
||||
* e.g. `/some/path` doesn't contain `/some/path_lib`. */
|
||||
BLI_path_slash_ensure(container_native, sizeof(container_native));
|
||||
|
||||
return BLI_str_startswith(containee_native, container_native);
|
||||
|
||||
Reference in New Issue
Block a user