Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Ryan_001

Member Since 23 Apr 2003
Offline Last Active Today, 11:35 AM

Topics I've Started

C++ dynamic_cast

18 August 2015 - 07:23 AM

While looking around for a faster way to perform dynamic_cast's I came across this: https://github.com/DigitalInBlue/Priori.  The general idea came from a Stroustrup paper not too long ago where every base class is given a unique prime number id, and then a simple modulo operation can determine the legitimacy of a dynamic_cast.  Seemed simple enough but from my understanding of dynamic_cast is that pointer adjustments sometimes must be made as well.  At its core the code posted seems to simply use reinterpret_cast.

template<class T, class V> T priori_cast(V base) 
{ 
	if(base != nullptr)
	{
		// If it is convertable to the base class or to itself, return
		if(std::is_convertible<std::remove_pointer<V>::type, std::remove_pointer<T>::type>::value == true)
	    {
			return reinterpret_cast<T>(base);
		}

		const auto factor = priori::get(typeid(std::remove_pointer<T>::type));

		if((factor != 0) && (base->priori(factor) == true))
		{
			return reinterpret_cast<T>(base);
		}
	}

	return nullptr; 
}

This doesn't seem kosher...  Any thoughts on this?


Unity Asset Store license

07 August 2015 - 05:28 PM

Simple question, if I purchase content from the Unity Asset store, can I use it in a non-Unity game?  I've read through the license (https://unity3d.com/legal/as_terms) and the following seemed to imply it was ok:
 
"Licensor grants to the END-USER a non-exclusive, worldwide, and perpetual license to the Asset to integrate Assets only as incorporated and embedded components of electronic games and interactive media and distribute such electronic game and interactive media."
 
That said I was wondering what other people thought?


Windows 10 is hideously ugly, any tips on how to fix?

29 July 2015 - 04:59 PM

Just upgraded from Windows 7 to 10... and this thing is ugly.  Does anyone know where to find a Windows 7 like theme?  Or some way to individually adjust colors/fonts.


Unity Asset Store problems

10 June 2015 - 10:57 AM

I tried to order a set of textures from the unity asset store for the first time the other day, only to have it reject two different credit cards. I called up VISA (one was VISA one Mastercard) and they said they saw the transaction, and it was accepted by them but canceled by the merchant. I tried sending Unity a 'sales inquiry' through their website but they haven't gotten back to me. Anyone else have a similar problem? Any ideas on how I would go about resolving it?

VS 2015 debugging errors

29 May 2015 - 06:38 AM

I came across a weird error while debugging in VS2015 (ya I know its a RC, but I was just trying it out). The code was executing correctly, but the value the debugger was showing were incorrect. I attached a screenshot. As you can see the debugger shows the values for the structure s as incorrect. Anyone else come across/notice this? Am I doing something wrong or should I report this?

PARTNERS