Skip to content

Commit c99403b

Browse files
committed
lint
1 parent ec66409 commit c99403b

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

include/fast_float/fast_float_strtod.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef __FAST_FLOAT_STRTOD_H__
2-
#define __FAST_FLOAT_STRTOD_H__
1+
#ifndef FAST_FLOAT_STRTOD_H__
2+
#define FAST_FLOAT_STRTOD_H__
33

44
#if defined(__cplusplus)
55
extern "C" {
@@ -28,4 +28,4 @@ double fast_float_strtod(const char *in, char **out);
2828
}
2929
#endif
3030

31-
#endif /* __FAST_FLOAT_STRTOD_H__ */
31+
#endif /* FAST_FLOAT_STRTOD_H__ */

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
add_library(fast_float_strtod STATIC fast_float_strtod.cpp)
22
target_link_libraries(fast_float_strtod PRIVATE fast_float)
33

4-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
4+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" AND NOT WIN32)
55
target_link_options(fast_float_strtod PRIVATE -nostdlib++)
66
endif()
77

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ add_subdirectory(build_tests)
110110
add_subdirectory(bloat_analysis)
111111

112112
add_executable(strtod_test strtod_test.c)
113-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
113+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" AND NOT WIN32)
114114
target_link_options(strtod_test PUBLIC -nostdlib++)
115115
endif()
116116
target_link_libraries(strtod_test PUBLIC fast_float_strtod)

tests/strtod_test.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
#include <errno.h>
55

66
int main() {
7-
// Test successful conversion
8-
const char *str1 = "3.14159";
9-
char *end1;
10-
errno = 0;
11-
double d1 = fast_float_strtod(str1, &end1);
12-
printf("Input: %s\n", str1);
13-
printf("Converted: %f\n", d1);
14-
printf("End pointer: %s\n", end1);
15-
printf("errno: %d\n", errno);
7+
// Test successful conversion
8+
const char *str1 = "3.14159";
9+
char *end1;
10+
errno = 0;
11+
double d1 = fast_float_strtod(str1, &end1);
12+
printf("Input: %s\n", str1);
13+
printf("Converted: %f\n", d1);
14+
printf("End pointer: %s\n", end1);
15+
printf("errno: %d\n", errno);
1616

17-
// Test invalid input
18-
const char *str2 = "invalid";
19-
char *end2;
20-
errno = 0;
21-
double d2 = fast_float_strtod(str2, &end2);
22-
printf("\nInput: %s\n", str2);
23-
printf("Converted: %f\n", d2);
24-
printf("End pointer: %s\n", end2);
25-
printf("errno: %d\n", errno);
17+
// Test invalid input
18+
const char *str2 = "invalid";
19+
char *end2;
20+
errno = 0;
21+
double d2 = fast_float_strtod(str2, &end2);
22+
printf("\nInput: %s\n", str2);
23+
printf("Converted: %f\n", d2);
24+
printf("End pointer: %s\n", end2);
25+
printf("errno: %d\n", errno);
2626

27-
return 0;
27+
return 0;
2828
}

0 commit comments

Comments
 (0)