diff --git a/main.cpp b/main.cpp index 2ddf5ea..6edf096 100644 --- a/main.cpp +++ b/main.cpp @@ -1,10 +1,13 @@  -#include -#include -#include // clock_t +#include +#include +#include // clock_t #include // std::bad_alloc #include "math.h" // log10 #include // min,max +#include +#include +#include using namespace std; @@ -14,11 +17,11 @@ using namespace std; #define MAX_INPUT_SIZE 0x10000 #define MIN_INPUT_SIZE 1 -typedef signed char sbyte; -typedef unsigned char byte; -typedef unsigned short ushort; -typedef unsigned int uint; -typedef signed __int64 int64; +typedef int8_t sbyte; +typedef uint8_t byte; +typedef uint16_t ushort; +typedef uint32_t uint; +typedef int64_t int64; #define ARRAYLEN(a) (sizeof a / sizeof a[0]) @@ -204,7 +207,7 @@ int main(int argc, const char* argv[]) if (ratio > 1) { ratio = max(ratio, 1.001); } - char* warning = (ratio >= 1) ? " (!)" : ""; + const char* warning = (ratio >= 1) ? " (!)" : ""; printf("compression: %d / %d = %.3f%s\n", packedSize, size, ratio, warning); printf("Writing compressed file: %s\n", outputPath);