Browse Source

Fix some noteworthy warnings (mostly hsBool->bool incompatibility) and missing headers

Michael Hansen 12 years ago
parent
commit
40d5e2e867
  1. 2
      Sources/Plasma/CoreLib/hsFastMath.cpp
  2. 2
      Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp
  3. 1
      Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp
  4. 1
      Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp
  5. 1
      Sources/Plasma/FeatureLib/pfPython/pyGUIControl.h
  6. 1
      Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.cpp
  7. 1
      Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.cpp
  8. 1
      Sources/Plasma/FeatureLib/pfPython/pyGUIControlGlue.cpp
  9. 1
      Sources/Plasma/FeatureLib/pfPython/pyImage.cpp
  10. 2
      Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp
  11. 2
      Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.h
  12. 2
      Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp
  13. 3
      Sources/Tools/MaxComponent/plAudioComponents.cpp
  14. 2
      Sources/Tools/MaxMain/plMaxNodeBase.cpp
  15. 2
      Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp
  16. 2
      Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp

2
Sources/Plasma/CoreLib/hsFastMath.cpp

@ -604,7 +604,7 @@ float hsFastMath::IATan2OverTwoPi(float y, float x)
if( (x == 0)&&(y == 0) ) if( (x == 0)&&(y == 0) )
return 0; return 0;
bool xNeg, yNeg; int xNeg, yNeg;
if((yNeg = (y < 0)))y = -y; if((yNeg = (y < 0)))y = -y;
if((xNeg = (x < 0)))x = -x; if((xNeg = (x < 0)))x = -x;
bool yBigger = y >= x; bool yBigger = y >= x;

2
Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCmd.cpp

@ -565,7 +565,7 @@ uint8_t pfConsoleCmd::GetSigEntry( uint8_t i )
const char *pfConsoleCmd::GetSignature( void ) const char *pfConsoleCmd::GetSignature( void )
{ {
char string[256]; static char string[256];
int i; int i;
char pStr[ 128 ]; char pStr[ 128 ];

1
Sources/Plasma/FeatureLib/pfPython/cyMisc.cpp

@ -85,6 +85,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pyAgeInfoStruct.h" #include "pyAgeInfoStruct.h"
#include "pyAgeLinkStruct.h" #include "pyAgeLinkStruct.h"
#include "pyAlarm.h" #include "pyAlarm.h"
#include "pyGeometry3.h"
#include "pfMessage/pfKIMsg.h" #include "pfMessage/pfKIMsg.h"
#include "plNetMessage/plNetMessage.h" #include "plNetMessage/plNetMessage.h"
#include "pfCamera/plVirtualCamNeu.h" #include "pfCamera/plVirtualCamNeu.h"

1
Sources/Plasma/FeatureLib/pfPython/pyGUIControl.cpp

@ -51,6 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pyGUIDialog.h" #include "pyGUIDialog.h"
#include "pyColor.h" #include "pyColor.h"
#include "pyGeometry3.h"
#include "pyGUIControlCheckBox.h" #include "pyGUIControlCheckBox.h"

1
Sources/Plasma/FeatureLib/pfPython/pyGUIControl.h

@ -54,6 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class pyGUIDialog; class pyGUIDialog;
class pyColor; class pyColor;
class pyPoint3;
class pyGUIControl class pyGUIControl
{ {

1
Sources/Plasma/FeatureLib/pfPython/pyGUIControlClickMap.cpp

@ -49,6 +49,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pyGUIControlClickMap.h" #include "pyGUIControlClickMap.h"
#include "pyGUIDialog.h" #include "pyGUIDialog.h"
#include "pyGeometry3.h"
pyGUIControlClickMap::pyGUIControlClickMap(pyKey& gckey) : pyGUIControl(gckey) pyGUIControlClickMap::pyGUIControlClickMap(pyKey& gckey) : pyGUIControl(gckey)
{ {

1
Sources/Plasma/FeatureLib/pfPython/pyGUIControlDraggable.cpp

@ -48,6 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pyGUIControlDraggable.h" #include "pyGUIControlDraggable.h"
#include "pyGUIDialog.h" #include "pyGUIDialog.h"
#include "pyGeometry3.h"
pyGUIControlDraggable::pyGUIControlDraggable(pyKey& gckey) : pyGUIControl(gckey) pyGUIControlDraggable::pyGUIControlDraggable(pyKey& gckey) : pyGUIControl(gckey)
{ {

1
Sources/Plasma/FeatureLib/pfPython/pyGUIControlGlue.cpp

@ -45,6 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#pragma hdrstop #pragma hdrstop
#include "pyGUIControl.h" #include "pyGUIControl.h"
#include "pyGeometry3.h"
// glue functions // glue functions
PYTHON_CLASS_DEFINITION(ptGUIControl, pyGUIControl); PYTHON_CLASS_DEFINITION(ptGUIControl, pyGUIControl);

1
Sources/Plasma/FeatureLib/pfPython/pyImage.cpp

@ -46,6 +46,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#pragma hdrstop #pragma hdrstop
#include "pyImage.h" #include "pyImage.h"
#include "pyGeometry3.h"
#include "plJPEG/plJPEG.h" #include "plJPEG/plJPEG.h"
#include "plGImage/plPNG.h" #include "plGImage/plPNG.h"
#include "pnKeyedObject/plUoid.h" #include "pnKeyedObject/plUoid.h"

2
Sources/Plasma/NucleusLib/pnMessage/plMessage.cpp

@ -369,7 +369,7 @@ int plMsgCStringHelper::Poke(const char * str, hsStream* stream, const uint32_t
{ {
plMessage::plStrLen len = (str) ? strlen(str) : 0; plMessage::plStrLen len = (str) ? strlen(str) : 0;
stream->WriteLE(len); stream->WriteLE(len);
if (strlen) if (len)
stream->Write(len,str); stream->Write(len,str);
return stream->GetPosition(); return stream->GetPosition();
} }

2
Sources/Plasma/PubUtilLib/plDrawable/plDynaDecal.h

@ -86,7 +86,7 @@ protected:
double fBirth; double fBirth;
float fInitAtten; float fInitAtten;
bool fFlags; uint32_t fFlags;
plDecalVtxFormat* fVtxBase; // Safe pointer, the buffer data will outlive this decal plDecalVtxFormat* fVtxBase; // Safe pointer, the buffer data will outlive this decal

2
Sources/Plasma/PubUtilLib/plGImage/plWinFontCache.cpp

@ -155,7 +155,7 @@ HFONT plWinFontCache::IMakeFont( const char *face, int height, int weight, boo
err = "Height of created font does not match"; err = "Height of created font does not match";
if( fontInfo.lfWeight != weight ) if( fontInfo.lfWeight != weight )
err = "Weight of created font does not match"; err = "Weight of created font does not match";
if( fontInfo.lfItalic != italic ) if( static_cast<bool>(fontInfo.lfItalic) != italic )
err = "Italic-ness of created font does not match"; err = "Italic-ness of created font does not match";
if( stricmp( fontInfo.lfFaceName, face ) != 0 ) if( stricmp( fontInfo.lfFaceName, face ) != 0 )
err = "Face of created font does not match"; err = "Face of created font does not match";

3
Sources/Tools/MaxComponent/plAudioComponents.cpp

@ -2813,7 +2813,6 @@ public:
BOOL DlgProc( TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) BOOL DlgProc( TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{ {
int i;
IParamBlock2 *pb = map->GetParamBlock(); IParamBlock2 *pb = map->GetParamBlock();
@ -2827,7 +2826,7 @@ public:
ComboBox_ResetContent( comboBox ); ComboBox_ResetContent( comboBox );
#ifdef EAX_SDK_AVAILABLE #ifdef EAX_SDK_AVAILABLE
for( i = 0; i < /*sizeof( EAX30_ORIGINAL_PRESETS ) for( int i = 0; i < /*sizeof( EAX30_ORIGINAL_PRESETS )
/ sizeof( EAXLISTENERPROPERTIES )*/26 ; i++ ) / sizeof( EAXLISTENERPROPERTIES )*/26 ; i++ )
ComboBox_AddString( comboBox, EAX30_ORIGINAL_PRESET_NAMES[ i ] ); ComboBox_AddString( comboBox, EAX30_ORIGINAL_PRESET_NAMES[ i ] );
#endif #endif

2
Sources/Tools/MaxMain/plMaxNodeBase.cpp

@ -1026,7 +1026,7 @@ Matrix3 plMaxNodeBase::GetWorldToParent(TimeValue t)
GetTMController()->GetLocalTMComponents(t, cmpts, parentMatrix); GetTMController()->GetLocalTMComponents(t, cmpts, parentMatrix);
Quat q; Quat q;
if( cmpts.rotRep == TMComponentsArg::RotationRep::kQuat ) if( cmpts.rotRep == TMComponentsArg::kQuat )
q = Quat(rot); q = Quat(rot);
else else
EulerToQuat(rot, q, cmpts.rotRep); EulerToQuat(rot, q, cmpts.rotRep);

2
Sources/Tools/MaxPlasmaLights/plRTProjDirLight.cpp

@ -463,7 +463,7 @@ void plRTProjDirLight::SetFallsize( TimeValue time, float f )
RefResult plRTProjDirLight::EvalLightState( TimeValue t, Interval& valid, LightState *ls ) RefResult plRTProjDirLight::EvalLightState( TimeValue t, Interval& valid, LightState *ls )
{ {
ls->type = DIRECT_LGT; ls->type = DIRECT_LGT;
if( fLightPB->GetInt( kLightOn, t ) == true ) if( fLightPB->GetInt( kLightOn, t ) )
ls->color = GetRGBColor( t, valid ); ls->color = GetRGBColor( t, valid );
else else
ls->color = Color( 0, 0, 0 ); ls->color = Color( 0, 0, 0 );

2
Sources/Tools/MaxPlasmaLights/plRealTimeLightBase.cpp

@ -1430,7 +1430,7 @@ RefResult plRTLightBase::EvalLightState(TimeValue t, Interval& valid, LightState
{ {
//t uselight; //t uselight;
//#if 0 //fLightPB->GetInt(kLightOn, t); //#if 0 //fLightPB->GetInt(kLightOn, t);
if(fLightPB->GetInt(kLightOn, t) == true) if(fLightPB->GetInt(kLightOn, t) )
ls->color = GetRGBColor(t,valid); ls->color = GetRGBColor(t,valid);
else else
ls->color = Color(0,0,0); ls->color = Color(0,0,0);

Loading…
Cancel
Save