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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - minirop

Pages: [1] 2 3
1
General discussions / Re: static analysis of SFML
« on: April 14, 2015, 03:18:22 pm »
I tried cppcheck to compare. There are a few "unused variable" like MainAndroid.cpp:L125, lJavaVM is never used, and a few "the score of the variable 'XXX' can be reduced".
Only one warning stands out from the rest, Window\Unix\GlxContext.cpp:L56,57, the initializer list is in the wrong order.

2
General discussions / Re: static analysis of SFML
« on: April 13, 2015, 12:46:24 pm »
(but why the double assignment?)
The separate declaration and initialization is of course pointless, it can be fixed too.
Do you have all the occurrences in text format?
all in glloader.cpp, L385/386, L463/464 and L496/502.
looking at the last one make me think it's probably for pre-C99 compatibility (declare all variable then assign them)

3
General discussions / Re: static analysis of SFML
« on: April 12, 2015, 12:34:42 am »
here it is. it's only an XML file (1.11MB).

4
General discussions / static analysis of SFML
« on: April 11, 2015, 12:37:36 am »
Hello,
as a test, I've tried PVS-Studio on SFML (master) and, considering I did it correctly, there is not many things to say (which is a good thing).

  • Most of the output was about c-style casts (mainly in glloader.cpp).
  • Several "variable assigned twice", like:
sfogl_StrToExtMap *entry = NULL;
entry = FindExtEntry(extensionName);
  • "The '(FT_RENDER_MODE_NORMAL)' named constant with the value of 0 is used in the bitwise operation. font.cpp:485"
  • SoundSource has a copy constructor but no assignment operator.
  • And a few about optimization, like : use !string.empty() instead of string != "".
  • Last, an UB in stb_image.h. There are bitwise shifts on negative numbers.
That's all folks!

Except the missing operator=(), the rest can be "forgotten" since it's mainly syntax choices¹ (but why the double assignment?)

++

¹: I know C-casts are discouraged, but with C structs and function, the static_cast should "win".

5
SFML development / Re: API deprecation model
« on: April 08, 2015, 12:58:59 pm »
What about other big projects? (Qt, boost, ...) Has someone any experience with those?
I just watched the source code of Qt, and they use 1. and 2. for methods, and simple a note for things like enum values (they use 3. only(?) for invalid arguments).

#ifdef QT_DEPRECATED
#define QT_DEPRECATED_SINCE(major, minor) (QT_VERSION_CHECK(major, minor, 0) > QT_DISABLE_DEPRECATED_BEFORE)
#else
#define QT_DEPRECATED_SINCE(major, minor) 0
#endif
// ...
#if QT_DEPRECATED_SINCE(5, 0)
    QT_DEPRECATED  char toAscii() const { return QChar(*this).toLatin1(); }
#endif
// QT_DEPRECATED expands to __attribute__ ((__deprecated__)) or __declspec(deprecated) or etc.

6
It's funny and sad at the same time
this website is a joke. between Microsoft propaganda "news" and clickbait... (and not speaking about the "writing" of some articles)

7
Feature requests / Re: std::size_t instead of unsigned int
« on: November 12, 2014, 01:04:25 pm »
but I'm currently not sure with what unsigned int would need to be consistent.
it should be std::vector<>::size_type, which in turn is std::size_t.

8
Given that it's trivial to just call the relevant functions with {x, y, z} in modern C++, I think the overloads should just go away.  Just my opinion.
they probably will go away when SFML goes full C++11, not before.

9
SFML projects / Re: Maze
« on: August 06, 2014, 10:35:16 pm »
Standard maze?
he means "from any place to any other place there is one and only one path" (you can't go round and round in circles)

10
Feature requests / Re: ability to use rotated images with setTextureRect
« on: August 06, 2014, 07:01:26 pm »
probably with having, let say, top/left being the top right corner and a negative width and let SFML do the work (for a 90 CW rotation) but probably too much hassle.

11
SFML projects / Re: Feather Kit - A C++ Game Framework
« on: April 07, 2014, 11:02:43 pm »
I will also no longer develop on the master branch (which is a very bad thing to do in the first place for a library) so the default cloning of the repo will always be the latest official release and will match the documentation.
Why that? I would say users that clone the Git repository expect to have the latest changes.

You can use Git tags to refer to official releases.
sometimes it can help.

12
General / Re: Can't compile my game
« on: October 13, 2012, 08:23:01 am »
and if you link in the right order ?
Quote
-lsfml-graphics -lsfml-window -lsfml-system

13
General discussions / Re: features for video streams from webcams
« on: October 09, 2012, 05:25:10 am »
SFML is (and will stay) "basic", if you want to play with your webcam, you can "plug" OpenCV.

14
Feature requests / Re: Getting/setting title of sf::Window?
« on: September 27, 2012, 05:24:12 pm »
One use-case where setting the window title should be possible : « knowing which file/project is open ».
With sfeMovie, if you do a small video player, you may want to have the window title being "My Awesome Player - Batman Return.avi".
Same with an editor : "My Great Editor - TestingLevel.lvl"
Still in the editor, you may want to add "My Great Editor - TestingLevel.lvl (not saved)". or "(unsaved changes)"

15
General discussions / Re: SFML v SDL?
« on: September 04, 2012, 08:31:01 pm »
SDL_Image and SDL_TTF are by the SDL guy.

Pages: [1] 2 3
anything