Revision: 6350
http://playerstage.svn.sourceforge.net/playerstage/?rev=6350&view=rev
Author: gerkey
Date: 2008-04-17 17:00:54 -0700 (Thu, 17 Apr 2008)
Log Message:
-----------
cleanup up unit specification
Modified Paths:
--------------
code/player/trunk/libplayercore/configfile.cc
Modified: code/player/trunk/libplayercore/configfile.cc
===================================================================
--- code/player/trunk/libplayercore/configfile.cc 2008-04-17 23:54:31 UTC
(rev 6349)
+++ code/player/trunk/libplayercore/configfile.cc 2008-04-18 00:00:54 UTC
(rev 6350)
@@ -246,11 +246,6 @@
const char* name,
const char* value)
{
- // AddField checks whether the field already exists
- int field = this->AddField(-1,name,0);
- this->AddToken(ConfigFile::TokenWord, value, 0);
- this->AddFieldValue(field, index, this->token_count-1);
-
// Work out what the length units are
if(!strcmp(name, "unit_length"))
{
@@ -260,6 +255,7 @@
this->unit_length = 0.01;
else if (strcmp(value, "mm") == 0)
this->unit_length = 0.001;
+ return;
}
// Work out what the angle units are
@@ -269,7 +265,14 @@
this->unit_angle = M_PI / 180;
else if (strcmp(value, "radians") == 0)
this->unit_angle = 1;
+ return;
}
+
+ // AddField checks whether the field already exists
+ int field = this->AddField(-1,name,0);
+ this->AddToken(ConfigFile::TokenWord, value, 0);
+ this->AddFieldValue(field, index, this->token_count-1);
+
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit