Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sourcecode not working/mistake -> Recource to sfml image  (Read 4915 times)

0 Members and 1 Guest are viewing this topic.

etixpp

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • FoxFire Development Website
    • Email
Sourcecode not working/mistake -> Recource to sfml image
« on: November 06, 2013, 11:26:49 pm »
https://github.com/SFML/SFML/wiki/Source%3A-Load-Image-From-Resource

if (!image.loadFromMemory(firstByte, rsrcDataSize))

should obviously be

if (!image->loadFromMemory(firstByte, rsrcDataSize))

« Last Edit: November 06, 2013, 11:33:16 pm by etixpp »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Sourcecode not working/mistake -> Recource to sfml image
« Reply #1 on: November 07, 2013, 01:15:46 am »
Since it's a community wiki, why don't you just correct it?

And the code has much bigger problems than typos, one of which is memory leaks (and less important: questionable exception types, non-local variable, useless initialization with NULL).

I'll fix everything.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

etixpp

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
    • FoxFire Development Website
    • Email
Re: Sourcecode not working/mistake -> Recource to sfml image
« Reply #2 on: November 07, 2013, 07:06:27 am »
Oh i forgot i can change it myself D: