]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Move sgn template to header file
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 22 Jul 2019 12:25:13 +0000 (14:25 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 22 Jul 2019 12:25:17 +0000 (14:25 +0200)
api/pslot.h
src/pslot.cc

index 3b69ecdafb6087ad85497202f1e109999fa4f183..9a86dab0a4acc2a511412d46996729426ce6240b 100644 (file)
@@ -75,4 +75,8 @@ class ParkingSlot {
                 ParkingSlot();
 };
 
+template <typename T> int sgn(T val) {
+        return (T(0) < val) - (val < T(0));
+}
+
 #endif /* PSLOT_H */
index 0efb39d1c7438eaf335e5e278cdd7cd3e555cee0..2bceb4e031e1b84bdb6e08a20708bf6bbf50afa8 100644 (file)
@@ -1,10 +1,6 @@
 #include <cmath>
 #include "pslot.h"
 
-template <typename T> int sgn(T val) {
-        return (T(0) < val) - (val < T(0));
-}
-
 // slot info
 double ParkingSlot::heading() const
 {