Commit c19d3d0b authored by cvet's avatar cvet

Comparison is null and !is null converted to == null and != null.

git-svn-id: https://xp-dev.com/svn/fonline_sdk@819 71b6ff52-6597-447a-9a87-58edf7a03249
parent 1d14e87c
......@@ -58,7 +58,7 @@ class FixedDropMenu : Gui::IDropMenu
private Entity get_SafeSelectedEntity()
{
// Simulate entity weak reference
if( SelectedEntity !is null && SelectedEntity.IsDestroyed )
if( SelectedEntity != null && SelectedEntity.IsDestroyed )
SelectedEntity = null;
return SelectedEntity;
}
......@@ -83,7 +83,7 @@ class FixedDropMenu : Gui::IDropMenu
void MouseDown( int button )
{
if( MouseButton == button && Cursor == __Cursor && SafeSelectedEntity !is null )
if( MouseButton == button && Cursor == __Cursor && SafeSelectedEntity != null )
{
Pressed = true;
PressedOffsetY = 0;
......@@ -93,7 +93,7 @@ class FixedDropMenu : Gui::IDropMenu
void MouseUp( int button )
{
if( MouseButton == button && SafeSelectedEntity !is null )
if( MouseButton == button && SafeSelectedEntity != null )
{
Pressed = false;
......@@ -141,15 +141,15 @@ class FixedDropMenu : Gui::IDropMenu
Gui::Object hoveredObj = Gui::GetHoveredObject();
Gui::Screen screen = Gui::GetActiveScreen();
if( hoveredObj !is null )
if( hoveredObj != null )
{
if( hoveredObj.Grid !is null && cast< Gui::ItemView >( hoveredObj.Grid ) !is null )
if( hoveredObj.Grid != null && cast< Gui::ItemView >( hoveredObj.Grid ) != null )
SelectedEntity = cast< Gui::ItemView >( hoveredObj.Grid ).GetItem( hoveredObj.CellIndex );
}
else if( screen is null || !screen.IsModal )
else if( screen == null || !screen.IsModal )
{
Entity entity = GetMonitorEntity( __MouseX, __MouseY );
if( entity !is null && ( cast< Critter >( entity ) !is null || cast< Item >( entity ) !is null ) )
if( entity != null && ( cast< Critter >( entity ) != null || cast< Item >( entity ) != null ) )
SelectedEntity = entity;
}
......@@ -170,7 +170,7 @@ class FixedDropMenu : Gui::IDropMenu
void Loop()
{
if( SafeSelectedEntity !is null )
if( SafeSelectedEntity != null )
{
if( Cursor != __Cursor )
{
......
This diff is collapsed.
......@@ -47,7 +47,7 @@
{
Clear();
dataArray = GetCacheData( name );
if( dataArray !is null )
if( dataArray != null )
{
bufSize = dataArray.length();
dataSize = bufSize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment