diff --git a/Makefile b/Makefile index 693c9dcb5..d16e41de7 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ .PHONY: clean cleandist -CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Idependencies/double-conversion -Ldependencies/double-conversion/release -ldouble-conversion +CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Idependencies/double-conversion -Ldependencies/double-conversion/release +LIBFLAGS = -ldouble-conversion #CXXFLAGS = -std=c++11 -O2 -march=native -Wall -Wextra -Wshadow -Wno-implicit-function-declaration EXECUTABLES=parse @@ -24,7 +25,7 @@ $(LIDDOUBLE) : dependencies/double-conversion/README.md cd dependencies/double-conversion/ && mkdir -p release && cd release && cmake .. && make parse: main.cpp common_defs.h linux-perf-events.h - $(CXX) $(CXXFLAGS) -o parse main.cpp + $(CXX) $(CXXFLAGS) -o parse main.cpp $(LIBFLAGS) testflatten: parse parsenocheesy parsenodep8 for filename in jsonexamples/twitter.json jsonexamples/gsoc-2018.json jsonexamples/citm_catalog.json jsonexamples/canada.json ; do \ diff --git a/main.cpp b/main.cpp index ed1650104..59b204aae 100644 --- a/main.cpp +++ b/main.cpp @@ -896,8 +896,8 @@ really_inline bool parse_number(const u8 * buf, UNUSED size_t len, UNUSED Parsed /// #ifdef DOUBLECONV int processed_characters_count; - double result = converter.StringToDouble((const char*)( buf+offset), 10, &processed_characters_count); - printf("number is %f and used %d chars \n", result, processed_characters_count); + double result_double_conv = converter.StringToDouble((const char*)( buf+offset), 10, &processed_characters_count); + printf("number is %f and used %d chars \n", result_double_conv, processed_characters_count); #endif //////////////// // end of double conv temporary stuff.