Browse Source

chore: fix some compiler warnings

pull/4856/head
sudden6 8 years ago
parent
commit
d01999814e
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 4
      src/audio/backend/openal2.cpp
  2. 2
      src/video/corevideosource.h
  3. 4
      src/video/videomode.cpp

4
src/audio/backend/openal2.cpp

@ -63,12 +63,8 @@ extern "C" { @@ -63,12 +63,8 @@ extern "C" {
* the context MUST exit with alProxyContext as active context and MUST not be
* interrupted. For this to work, all functions of the base class modifying the
* context have to be overriden.
*
* @var BUFFER_COUNT
* @brief Number of buffers to use per audio source
*/
static const unsigned int BUFFER_COUNT = 16;
static const unsigned int PROXY_BUFFER_COUNT = 4;
#define GET_PROC_ADDR(dev, name) name = reinterpret_cast<LP##name>(alcGetProcAddress(dev, #name))

2
src/video/corevideosource.h

@ -50,7 +50,7 @@ private: @@ -50,7 +50,7 @@ private:
std::atomic_bool stopped;
friend class CoreAV;
friend struct ToxFriendCall;
friend class ToxFriendCall;
};
#endif // COREVIDEOSOURCE_H

4
src/video/videomode.cpp

@ -59,7 +59,7 @@ QRect VideoMode::toRect() const @@ -59,7 +59,7 @@ QRect VideoMode::toRect() const
bool VideoMode::operator==(const VideoMode& other) const
{
return width == other.width && height == other.height && x == other.x && y == other.y
&& FPS == other.FPS && pixel_format == other.pixel_format;
&& qFuzzyCompare(FPS, other.FPS) && pixel_format == other.pixel_format;
}
uint32_t VideoMode::norm(const VideoMode& other) const
@ -72,5 +72,5 @@ uint32_t VideoMode::norm(const VideoMode& other) const @@ -72,5 +72,5 @@ uint32_t VideoMode::norm(const VideoMode& other) const
*/
VideoMode::operator bool() const
{
return width || height || (FPS < 0);
return width || height || static_cast<int>(FPS);
}

Loading…
Cancel
Save