From d398de1f8f5da994b54e2ea489e346d4ff5612ab Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 7 Oct 2022 03:49:56 +0400 Subject: [PATCH] to_wattspersecond() changed to price_to_wattspersecond(). --- src/main.c | 4 ++-- src/main.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index e4c4b10..f601382 100644 --- a/src/main.c +++ b/src/main.c @@ -36,7 +36,7 @@ int parse_arguments(const int argc, const char * const * const argv, } else if (argc < 4) { return 1; } else if (pos == 0) { - *price = to_wattspersecond((price_t)atof(argv[i])); + *price = price_to_wattspersecond((price_t)atof(argv[i])); ++pos; } else if (pos == 1) { *wattage = (wattage_t)atof(argv[2]); @@ -65,7 +65,7 @@ inline interval_t interval_to_seconds(const char * const interval) { } } -inline price_t to_wattspersecond(const price_t price) { +inline price_t price_to_wattspersecond(const price_t price) { return price / 1000.f / 3600.f; } diff --git a/src/main.h b/src/main.h index d987387..9e746ae 100644 --- a/src/main.h +++ b/src/main.h @@ -11,7 +11,7 @@ int parse_arguments(const int argc, const char *const *const argv, price_t * const price, wattage_t * const wattage, interval_t * const interval); inline interval_t interval_to_seconds(const char * const interval); -inline price_t to_wattspersecond(const price_t price); +inline price_t price_to_wattspersecond(const price_t price); inline void print_version(); inline void print_usage();