mirror of
https://gitea.home.endeavr.de/Marcel/Tarstats-pp.git
synced 2025-12-10 00:39:01 +01:00
Some git cleanup cleanup
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/cmake-build-debug/
|
||||
/.idea/
|
||||
/cmake-build-release/
|
||||
|
||||
@@ -4,4 +4,4 @@ project(Tarstats__)
|
||||
set(CMAKE_CXX_STANDARD 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)
|
||||
|
||||
6
main.cpp
6
main.cpp
@@ -57,19 +57,19 @@ int main(int argc, char** argv) {
|
||||
|
||||
|
||||
// Read size of the next file
|
||||
long double filesize{};
|
||||
long double itemsize{};
|
||||
int power = 10;
|
||||
std::string asciifilesize(&headbuffer[124], 11);
|
||||
for (auto i : asciifilesize) {
|
||||
int value = i - '0';
|
||||
filesize += value * std::pow(8,power);
|
||||
itemsize += value * std::pow(8, power);
|
||||
power--;
|
||||
}
|
||||
|
||||
//Printing to stdout
|
||||
std::cout << itemname << std::endl;
|
||||
std::cout << itemtype << std::endl;
|
||||
std::cout << filesize << " Bytes" << std::endl;
|
||||
std::cout << itemsize << " Bytes" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user