Some git cleanup cleanup

This commit is contained in:
Marcel Nowicki
2022-02-06 22:12:14 +01:00
parent af847241ce
commit 2bbfa75a7e
3 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
/cmake-build-debug/ /cmake-build-debug/
/.idea/ /.idea/
/cmake-build-release/

View File

@@ -4,4 +4,4 @@ project(Tarstats__)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -std=c++20") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -std=c++20")
add_executable(Tarstats__ main.cpp) add_executable(tarstats_pp main.cpp)

View File

@@ -57,19 +57,19 @@ int main(int argc, char** argv) {
// Read size of the next file // Read size of the next file
long double filesize{}; long double itemsize{};
int power = 10; int power = 10;
std::string asciifilesize(&headbuffer[124], 11); std::string asciifilesize(&headbuffer[124], 11);
for (auto i : asciifilesize) { for (auto i : asciifilesize) {
int value = i - '0'; int value = i - '0';
filesize += value * std::pow(8,power); itemsize += value * std::pow(8, power);
power--; power--;
} }
//Printing to stdout //Printing to stdout
std::cout << itemname << std::endl; std::cout << itemname << std::endl;
std::cout << itemtype << std::endl; std::cout << itemtype << std::endl;
std::cout << filesize << " Bytes" << std::endl; std::cout << itemsize << " Bytes" << std::endl;
return 0; return 0;
} }