]> granicus.if.org Git - graphviz/commitdiff
remove Windows overrides of `inline`
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Jul 2021 03:58:59 +0000 (20:58 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 27 Jul 2021 04:05:16 +0000 (21:05 -0700)
The `undef` part of this macro juggling was typoed as `WIN32_STATIC` in commit
b26b5fc076c1b5d9919ce79c807f5b3921149597, so it never properly undid the
preceding `inline` redirection. However, this redirection is unnecessary anyway.
Contrary to the Microsoft docs,¹ the `inline` keyword seems understood in *both*
C and C++.

¹ https://docs.microsoft.com/en-us/cpp/cpp/inline-functions-cpp?view=msvc-160

lib/common/geomprocs.h

index 81415f1cab934f2c7c7b20157ad7c3289716eef8..dcbe390effdea4198b4329addfd65bdc24f174c6 100644 (file)
@@ -51,10 +51,6 @@ GEOMPROCS_API void rect2poly(pointf *p);
 
 GEOMPROCS_API int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p);
 
-#if defined(_WIN32)
-#define inline __inline
-#endif
-
 static inline pointf pointfof(double x, double y)
 {
     pointf r;
@@ -191,9 +187,6 @@ static inline pointf scale (double c, pointf p)
     r.y = c * p.y;
     return r;
 }
-#ifdef WIN32_STATIC
-#undef inline
-#endif
 
 #undef GEOMPROCS_API
 #ifdef __cplusplus