Changeset 64 for cpp/gdk/conv_f1.cpp
- Timestamp:
- 01/28/11 23:29:40 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/gdk/conv_f1.cpp
r5 r64 1 // This file is a part of Framsticks GDK library.2 // Copyright (C) 2002-20 06Szymon Ulatowski. See LICENSE.txt for details.3 // Refer to http://www.frams .alife.pl/ for further information.1 // This file is a part of the Framsticks GDK library. 2 // Copyright (C) 2002-2011 Szymon Ulatowski. See LICENSE.txt for details. 3 // Refer to http://www.framsticks.com/ for further information. 4 4 5 5 #include "conv_f1.h" … … 48 48 void addOrRememberInput(int n1,int n2,float w) 49 49 { 50 if (!addInput(n1,n2,w,false))51 50 //if (!addInput(n1,n2,w,false)) 51 connections+=Connection(n1,n2,w); 52 52 } 53 53 bool addInput(int n1,int n2,float w,bool final) … … 270 270 } 271 271 272 // remove leading & trailing whitespaces273 static void trim(SString& s)274 {275 const char*b=(const char*)s;276 const char*e=b+s.len();277 while((b<e)&&(*b<=' ')) b++;278 while((b<e)&&(e[-1]<=' ')) e--;279 if ((e-b)==s.len()) return;280 char* t=s.directWrite();281 if (t!=b) memmove(t,b,e-b);282 s.endWrite(e-b);283 }284 285 272 const char* Builder::growNeuro(const char* t, F1Props& props,int &hasmuscles) 286 273 { … … 346 333 haveclass=1; 347 334 SString clsname(begin,t-begin); 348 trim(clsname);335 clsname=trim(clsname); 349 336 last_f1_neuro->setClassName(clsname); 350 337 NeuroClass *cls=last_f1_neuro->getClass();
Note: See TracChangeset
for help on using the changeset viewer.