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

Author Topic: New naming convention  (Read 96812 times)

0 Members and 1 Guest are viewing this topic.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
New naming convention
« Reply #120 on: January 27, 2012, 10:59:06 pm »
Then you learned your lesson I guess. ;)

deadalnix

  • Newbie
  • *
  • Posts: 45
    • View Profile
New naming convention
« Reply #121 on: January 29, 2012, 04:51:27 pm »
Ho God :D

I hate you and love you at the same time. The convention is way better but . . . So much broken code.

capz

  • Newbie
  • *
  • Posts: 29
    • View Profile
New naming convention
« Reply #122 on: February 07, 2012, 04:15:02 am »
Sweet! sfml is switching to the exact naming convention that I already use :) this is going to make my life with sfml even nicer ^^. Happy to see the "get" bits were added back in, seems confusing without.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #123 on: March 11, 2012, 07:17:01 pm »
It's pushed.

Reminder: the public member variables and functions, as well as free functions, are now lowerCase. That's all.
Laurent Gomila - SFML developer

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
New naming convention
« Reply #124 on: March 11, 2012, 07:38:32 pm »
I get the following error while compiling:
Quote
/home/.../SFML2/src/SFML/Graphics/GLCheck.cpp:28:37: fatal error: SFML/Graphics/glCheck.hpp: No such file or directory
compilation terminated.

The file is called GLCheck.hpp, not glCheck.hpp.

In the audio folder I have the same problem with ALCheck.hpp.
TGUI: C++ SFML GUI

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #125 on: March 11, 2012, 08:14:30 pm »
Oops. I was pretty confident there was no filename error since I compiled on Linux, but after your message I realized that my Linux system uses a NTFS file system (shared folder used by a virtual machine).

It's fixed now -- well, it should, since I haven't tested :D
Laurent Gomila - SFML developer

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
New naming convention
« Reply #126 on: March 11, 2012, 08:33:24 pm »
It's working now.
Thanks
TGUI: C++ SFML GUI

Mjonir

  • Full Member
  • ***
  • Posts: 142
    • View Profile
New naming convention
« Reply #127 on: March 11, 2012, 08:42:04 pm »
I've just compiled it on Windows and changed my project accordingly, it works perfectly.

I was just surprised by the change "sf::Seconds" -> "sf::seconds", it doesn't seem to match the usual convention for all SFML classes?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #128 on: March 11, 2012, 08:51:43 pm »
Quote
I was just surprised by the change "sf::Seconds" -> "sf::seconds", it doesn't seem to match the usual convention for all SFML classes?

It's not a class, it's a function.
Laurent Gomila - SFML developer

Mjonir

  • Full Member
  • ***
  • Posts: 142
    • View Profile
New naming convention
« Reply #129 on: March 11, 2012, 08:54:44 pm »
Quote from: "Laurent"
It's not a class, it's a function.


Ooh, alright, I skimmed over the code and did not notice that. Well the new convention makes that fact much more clear, it's a really good thing :)

frosty

  • Newbie
  • *
  • Posts: 13
    • View Profile
New naming convention
« Reply #130 on: March 11, 2012, 10:41:56 pm »
Quote from: "Laurent"
It's pushed.


Woohoo! Thanks Laurent.  :D

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
New naming convention
« Reply #131 on: March 12, 2012, 04:12:52 pm »
I am getting errors in Rect.inl on lines 67, 68 and 69.
Top, Width and Height should be top, width and height.

Not so important, but I am also getting warnings inside Rect.inl on line 40.
The left, top, width and height declarations are shadowing the members of Rect.
The parameters should get a different name.

Edit: I also have warnings in Font.hpp on line 222 for the same reason.
TGUI: C++ SFML GUI

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #132 on: March 12, 2012, 06:02:33 pm »
Quote
I am getting errors in Rect.inl on lines 67, 68 and 69.
Top, Width and Height should be top, width and height.

It's fixed, thanks.

Quote
Not so important, but I am also getting warnings inside Rect.inl on line 40.
The left, top, width and height declarations are shadowing the members of Rect.
The parameters should get a different name.

I use this everywhere without any problem.
I compile with:
- VC++, warnings level 4
- CLang, -Wall
- gcc, -Wall
... and never got a warning for this. What compiler/settings do you use?
Laurent Gomila - SFML developer

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
New naming convention
« Reply #133 on: March 12, 2012, 06:06:32 pm »
The option that causes the warning is -Wshadow with gcc.[/quote]
TGUI: C++ SFML GUI

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
New naming convention
« Reply #134 on: March 12, 2012, 06:17:59 pm »
And why isn't it in -Wall (which I assumed gathered all the possible warnings)?
Laurent Gomila - SFML developer