tidy
sophuwu sophie@skisiel.com
Wed, 20 Nov 2024 23:20:26 +0100
5 files changed,
10 insertions(+),
21 deletions(-)
M
.gitignore
→
.gitignore
@@ -1,11 +1,2 @@
-**/* -!.idea/**/* -!**/*/ -!**/*.cpp -!**/*.c -!**/*.h -!**/*.hpp -!**/Makefile -!**/README.md -!**/.gitignore -!src/**/* +build/ +.idea/
M
src/calc.cpp
→
src/calc.cpp
@@ -1,12 +1,11 @@
-#include <iostream> #include "calc.h" -long getFloat(char* str, flt_t& num) { +int getFloat(char* str, flt_t& num) { flt_t iPart = 0.0f; flt_t fPart = 0.0f; - long fPartLen = 0; - long i = 0; - long sign = 1; + int_t fPartLen = 0; + int i = 0; + int sign = 1; if (str[0] == '-') { sign = -1;
M
src/calc.h
→
src/calc.h
@@ -1,9 +1,13 @@
#ifndef TERMCALC_CALC_H #define TERMCALC_CALC_H +#include <iostream> #include <cfloat> #include <cmath> +#include <string> typedef long double flt_t; typedef long long int_t; + +typedef std::string strr; #endif //TERMCALC_CALC_H