mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
use static
Signed-off-by: 李昂 <liang6516@outlook.com>
This commit is contained in:
parent
c226f3f424
commit
b77d20d7b2
@ -486,17 +486,19 @@ struct scaling_factor {
|
||||
// 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
|
||||
: 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
|
||||
: normalized * normalization.raw_factor;
|
||||
}
|
||||
|
||||
struct scaling_factor update_normalization(struct scaling_factor sf,
|
||||
static struct scaling_factor update_normalization(
|
||||
struct scaling_factor sf,
|
||||
double extra_multiplicative_factor) {
|
||||
struct scaling_factor result;
|
||||
if (sf.multiply) {
|
||||
@ -1256,7 +1258,10 @@ static int __vsnprintf(out_fct_type out,
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user