From c7ac569634c07de169a91c9f4d028ecd3899b4df Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 27 Apr 2012 16:07:12 +0200 Subject: improved readability, fixes --- dtrain/dtrain.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dtrain/dtrain.h') diff --git a/dtrain/dtrain.h b/dtrain/dtrain.h index 7b03d258..15d32e36 100644 --- a/dtrain/dtrain.h +++ b/dtrain/dtrain.h @@ -13,7 +13,7 @@ #include "filelib.h" -//#define DTRAIN_LOCAL +#define DTRAIN_LOCAL #define DTRAIN_DOTS 10 // after how many inputs to display a '.' #define DTRAIN_GRAMMAR_DELIM "########EOS########" @@ -85,7 +85,8 @@ inline void printWordIDVec(vector& v) } template -inline T sign(T z) { +inline T sign(T z) +{ if (z == 0) return 0; return z < 0 ? -1 : +1; } -- cgit v1.2.3