use static

Signed-off-by: 李昂 <liang6516@outlook.com>
This commit is contained in:
李昂 2023-01-12 12:08:34 +00:00 committed by Gitee
parent c226f3f424
commit b77d20d7b2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -486,18 +486,20 @@ struct scaling_factor {
// to divide by it // to divide by it
}; };
double apply_scaling(double num, struct scaling_factor normalization) { static double apply_scaling(double num, struct scaling_factor normalization) {
return normalization.multiply ? num * normalization.raw_factor return normalization.multiply ? num * normalization.raw_factor
: num / normalization.raw_factor; : num / normalization.raw_factor;
} }
double unapply_scaling(double normalized, struct scaling_factor normalization) { static double unapply_scaling(double normalized,
struct scaling_factor normalization) {
return normalization.multiply ? normalized / normalization.raw_factor return normalization.multiply ? normalized / normalization.raw_factor
: normalized * normalization.raw_factor; : normalized * normalization.raw_factor;
} }
struct scaling_factor update_normalization(struct scaling_factor sf, static struct scaling_factor update_normalization(
double extra_multiplicative_factor) { struct scaling_factor sf,
double extra_multiplicative_factor) {
struct scaling_factor result; struct scaling_factor result;
if (sf.multiply) { if (sf.multiply) {
result.multiply = true; result.multiply = true;
@ -1256,7 +1258,10 @@ static int __vsnprintf(out_fct_type out,
* *
* @return The number of characters actually written to buffer. * @return The number of characters actually written to buffer.
*/ */
int pika_vsnprintf(char* buf, rt_size_t size, const char* fmt, va_list args) { static int pika_vsnprintf(char* buf,
rt_size_t size,
const char* fmt,
va_list args) {
return __vsnprintf(out_buffer, buf, size, fmt, args); return __vsnprintf(out_buffer, buf, size, fmt, args);
} }