mirror of
https://github.com/transmission/transmission.git
synced 2025-12-26 21:29:18 +00:00
underscores in documentation comments should be code escaped (#4639)
This commit is contained in:
@@ -61,7 +61,7 @@ struct tr_error;
|
||||
[[nodiscard]] std::string_view tr_get_mime_type_for_filename(std::string_view filename);
|
||||
|
||||
/**
|
||||
* @brief Rich Salz's classic implementation of shell-style pattern matching for ?, \, [], and * characters.
|
||||
* @brief Rich Salz's classic implementation of shell-style pattern matching for `?`, `\`, `[]`, and `*` characters.
|
||||
* @return 1 if the pattern matches, 0 if it doesn't, or -1 if an error occurred
|
||||
*/
|
||||
[[nodiscard]] bool tr_wildmat(std::string_view text, std::string_view pattern);
|
||||
@@ -127,10 +127,10 @@ int tr_main_win32(int argc, char** argv, int (*real_main)(int, char**));
|
||||
return value == nullptr || *value == '\0';
|
||||
}
|
||||
|
||||
/** @brief Portability wrapper for strlcpy() that uses the system implementation if available */
|
||||
/** @brief Portability wrapper for `strlcpy()` that uses the system implementation if available */
|
||||
size_t tr_strlcpy(void* dst, void const* src, size_t siz);
|
||||
|
||||
/** @brief Convenience wrapper around strerorr() guaranteed to not return nullptr
|
||||
/** @brief Convenience wrapper around `strerorr()` guaranteed to not return nullptr
|
||||
@param errnum the error number to describe */
|
||||
[[nodiscard]] char const* tr_strerror(int errnum);
|
||||
|
||||
@@ -217,8 +217,8 @@ size_t tr_strvToBuf(std::string_view src, char* buf, size_t buflen);
|
||||
|
||||
// ---
|
||||
|
||||
/** @brief return TR_RATIO_NA, TR_RATIO_INF, or a number in [0..1]
|
||||
@return TR_RATIO_NA, TR_RATIO_INF, or a number in [0..1] */
|
||||
/** @brief return `TR_RATIO_NA`, `TR_RATIO_INF`, or a number in [0..1]
|
||||
@return `TR_RATIO_NA`, `TR_RATIO_INF`, or a number in [0..1] */
|
||||
[[nodiscard]] double tr_getRatio(uint64_t numerator, uint64_t denominator);
|
||||
|
||||
/**
|
||||
@@ -233,9 +233,9 @@ size_t tr_strvToBuf(std::string_view src, char* buf, size_t buflen);
|
||||
/**
|
||||
* @brief truncate a double value at a given number of decimal places.
|
||||
*
|
||||
* this can be used to prevent a printf() call from rounding up:
|
||||
* call with the decimal_places argument equal to the number of
|
||||
* decimal places in the printf()'s precision:
|
||||
* this can be used to prevent a `printf()` call from rounding up:
|
||||
* call with the `decimal_places` argument equal to the number of
|
||||
* decimal places in the `printf()`'s precision:
|
||||
*
|
||||
* - printf("%.2f%%", 99.999) ==> "100.00%"
|
||||
*
|
||||
@@ -283,16 +283,16 @@ extern time_t current_time;
|
||||
return libtransmission::detail::tr_time::current_time;
|
||||
}
|
||||
|
||||
/** @brief Private libtransmission function to update tr_time()'s counter */
|
||||
/** @brief Private libtransmission function to update `tr_time()`'s counter */
|
||||
constexpr void tr_timeUpdate(time_t now) noexcept
|
||||
{
|
||||
libtransmission::detail::tr_time::current_time = now;
|
||||
}
|
||||
|
||||
/** @brief Portability wrapper for htonll() that uses the system implementation if available */
|
||||
/** @brief Portability wrapper for `htonll()` that uses the system implementation if available */
|
||||
[[nodiscard]] uint64_t tr_htonll(uint64_t);
|
||||
|
||||
/** @brief Portability wrapper for htonll() that uses the system implementation if available */
|
||||
/** @brief Portability wrapper for `ntohll()` that uses the system implementation if available */
|
||||
[[nodiscard]] uint64_t tr_ntohll(uint64_t);
|
||||
|
||||
// ---
|
||||
|
||||
Reference in New Issue
Block a user