TheCherno / Cherno

The Cherno engine, for Ludum Dare.
GNU General Public License v3.0
75 stars 36 forks source link

Added load Image from URL #14

Open AlphaRex12 opened 10 years ago

AlphaRex12 commented 10 years ago

Load a image from a URL!

SebastienGllmt commented 10 years ago

I don't like this because it's a case of DRY (http://en.wikipedia.org/wiki/Don%27t_repeat_yourself) where we're creating a copy of a previous constructor we already have but with a single variable change. If you wanted to add this, I suggest you make one call the other. i.e. URL constructor turns it into a string and calls the String constructor String constructor turns into a URL and calls the URL constructor

That makes that if we want to change how the Texture object is constructed, we don't have to change the same code in multiple places.