|
From: <axl...@us...> - 2010-01-14 21:31:21
|
Revision: 659
http://hgengine.svn.sourceforge.net/hgengine/?rev=659&view=rev
Author: axlecrusher
Date: 2010-01-14 21:30:42 +0000 (Thu, 14 Jan 2010)
Log Message:
-----------
fix warnings
Modified Paths:
--------------
Mercury2/Mercury2.vcproj
Mercury2/src/MercuryValue.cpp
Mercury2/src/MercuryValue.h
Modified: Mercury2/Mercury2.vcproj
===================================================================
--- Mercury2/Mercury2.vcproj 2010-01-14 19:36:39 UTC (rev 658)
+++ Mercury2/Mercury2.vcproj 2010-01-14 21:30:42 UTC (rev 659)
@@ -480,6 +480,14 @@
>
</File>
<File
+ RelativePath=".\src\MercuryValue.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\src\MercuryValue.h"
+ >
+ </File>
+ <File
RelativePath=".\src\MercuryVBO.cpp"
>
</File>
Modified: Mercury2/src/MercuryValue.cpp
===================================================================
--- Mercury2/src/MercuryValue.cpp 2010-01-14 19:36:39 UTC (rev 658)
+++ Mercury2/src/MercuryValue.cpp 2010-01-14 21:30:42 UTC (rev 659)
@@ -74,7 +74,7 @@
{
switch( m_CurType )
{
- case TYPE_INT: return m_Data.l;
+ case TYPE_INT: return (int)m_Data.l;
case TYPE_FLOAT: return m_Data.f;
case TYPE_STRING: return StrToInt(*m_Data.dataS);
default: return 0;
@@ -85,7 +85,7 @@
{
switch( m_CurType )
{
- case TYPE_INT: return m_Data.l;
+ case TYPE_INT: return (float)m_Data.l;
case TYPE_FLOAT: return m_Data.f;
case TYPE_STRING: return StrToFloat(*m_Data.dataS);
default: return 0;
Modified: Mercury2/src/MercuryValue.h
===================================================================
--- Mercury2/src/MercuryValue.h 2010-01-14 19:36:39 UTC (rev 658)
+++ Mercury2/src/MercuryValue.h 2010-01-14 21:30:42 UTC (rev 659)
@@ -52,7 +52,7 @@
float GetFloat() { MSemaphoreLock( &this->m_Sema ); return (m_CurType == TYPE_FLOAT)?m_Data.f:ConvFloat(); }
const MString GetString() { MSemaphoreLock( &this->m_Sema ); return (m_CurType == TYPE_STRING)?*m_Data.dataS:ConvString(); }
void GetString( MString & str ) { MSemaphoreLock( &this->m_Sema ); if (m_CurType == TYPE_STRING) str = *m_Data.dataS; else ConvString( str ); }
- bool GetBool() { MSemaphoreLock( &this->m_Sema ); return (m_CurType == TYPE_INT)?m_Data.l:ConvBool(); }
+ bool GetBool() { MSemaphoreLock( &this->m_Sema ); return (m_CurType == TYPE_INT)?m_Data.l!=0:ConvBool(); }
void * GetPtr() { MSemaphoreLock( &this->m_Sema ); return (m_CurType == TYPE_PTR)?m_Data.v:0; }
void SetInt( int iv ) { MSemaphoreLock( &this->m_Sema ); Cleanup(); m_Data.l = iv; m_CurType = TYPE_INT; Notify();}
@@ -167,7 +167,7 @@
MVRefBool( const MString & p ) : MVRefBase( p ) { }
int Get() { return mv->GetBool(); }
- void Set( int iv ) { mv->SetBool( iv ); }
+ void Set( int iv ) { mv->SetBool( iv!=0 ); }
};
///Value Reference for Float objects.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|