Jump to content

warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)


birender

Recommended Posts

Hi I tried to install offlineshop by ken

I compiled the sever and client source successfully

But I get error on client source

	Line 392: 16>PythonNetworkStreamPhaseGame.cpp(4212): warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)
	Line 392: 16>PythonNetworkStreamPhaseGame.cpp(4212): warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning)

This is my function where I get error

I tried some fixes which I have commented now but it didn't help

		case SHOP_SUBHEADER_GC_CHECK_RESULT:
		{
			BYTE bHasOfflineShop;
			//BYTE bHasOfflineShop = 0;
			//BYTE bHasOfflineShop! = 0;
			//BYTE bHasOfflineShop! = NULL;
			if (!Recv(sizeof(BYTE), &bHasOfflineShop))
				return false;

			TraceError("OfflineShopResult(%d)", bHasOfflineShop);

			CPythonPlayer::instance().SetHasOfflineShop(bHasOfflineShop);
			break;
		}

Plz help

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...