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

Author Topic: VertexArray's getVertexCount not size_t?  (Read 2876 times)

0 Members and 1 Guest are viewing this topic.

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
VertexArray's getVertexCount not size_t?
« on: March 23, 2014, 07:42:48 pm »
I opened this here instead of Feature Request because I am more curious than anything else, but I always wondered why getVertexCount returned an unsigned integer instead of a size_t.

I mean, I get that 4 million verticies is a lot already, but it just seems like using a size_t in this case, as well as in the RenderTarget's vertex draw method, makes a lot more sense in my opinion.

P.S.

Sorry if this was asked before. I did do some googling, but couldn't find anything related to this.
DSFML - SFML for the D Programming Language.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: VertexArray's getVertexCount not size_t?
« Reply #1 on: March 23, 2014, 07:48:29 pm »
If I remember correctly, it's for consistency with other classes/functions. And the maximum of a 32-bits unsigned integer is 4 billions, not millions ;)
Laurent Gomila - SFML developer

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: VertexArray's getVertexCount not size_t?
« Reply #2 on: March 23, 2014, 07:56:13 pm »
And the maximum of a 32-bits unsigned integer is 4 billions, not millions ;)

Oh yeah. My bad. :P

Quote from: Laurent
If I remember correctly, it's for consistency with other classes/functions.

Maybe I'll look more into this. Thanks for the answer!
DSFML - SFML for the D Programming Language.