Permalink
Browse files

Fix some Clang warnings

  • Loading branch information...
1 parent 1a8785f commit d3ca825b8a9a73e5f02f33fd3bd1c79cdbd26847 @lachs0r lachs0r committed May 24, 2012
Showing with 8 additions and 11 deletions.
  1. +2 −4 CMakeLists.txt
  2. +1 −2 src/baseguiplus.cpp
  3. +4 −4 src/myprocess.cpp
  4. +1 −1 src/myprocess.h
View
@@ -8,15 +8,13 @@ find_program(QT_LRELEASE_EXECUTABLE NAMES lrelease)
set(SMPLAYER2_VERSION_MAJOR 0)
set(SMPLAYER2_VERSION_MINOR 7)
-set(SMPLAYER2_VERSION_RELEASE 2)
+set(SMPLAYER2_VERSION_RELEASE 3)
execute_process(COMMAND ${PROJECT_SOURCE_DIR}/version.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE SMPLAYER2_VERSION_GITREV OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(SMPLAYER2_VERSION "${SMPLAYER2_VERSION_MAJOR}.${SMPLAYER2_VERSION_MINOR}.${SMPLAYER2_VERSION_RELEASE}${SMPLAYER2_VERSION_GITREV}")
-if (CMAKE_COMPILER_IS_GNUCXX)
- add_definitions("-Wall -pedantic -std=c++0x")
-endif()
+add_definitions("-Wall -pedantic -std=c++0x")
if (MINGW)
add_definitions("-U__STRICT_ANSI__")
View
@@ -416,8 +416,7 @@ void BaseGuiPlus::aboutToEnterFullscreen()
ignore_playlist_events = true;
// Hide the playlist if it's in the same screen as the main window
- if ((playlist_screen == mainwindow_screen) /* ||
- (!fullscreen_playlist_was_floating) */) {
+ if (playlist_screen == mainwindow_screen) {
playlistdock->setFloating(true);
playlistdock->hide();
}
View
@@ -114,7 +114,7 @@ void MyProcess::genericRead(QByteArray buffer)
QByteArray ba = remaining_output + buffer;
int start = 0;
int from_pos = 0;
- int pos = canReadLine(ba, from_pos);
+ int pos = isLine(ba, from_pos);
//qDebug("MyProcess::read: pos: %d", pos);
while (pos > -1) {
@@ -132,18 +132,18 @@ void MyProcess::genericRead(QByteArray buffer)
emit lineAvailable(line);
- pos = canReadLine(ba, from_pos);
+ pos = isLine(ba, from_pos);
}
remaining_output = ba.mid(from_pos);
}
-int MyProcess::canReadLine(const QByteArray &ba, int from)
+int MyProcess::isLine(const QByteArray &ba, int from)
{
int pos1 = ba.indexOf('\n', from);
int pos2 = ba.indexOf('\r', from);
- //qDebug("MyProcess::canReadLine: pos2: %d", pos2);
+ //qDebug("MyProcess::isLine: pos2: %d", pos2);
if ((pos1 == -1) && (pos2 == -1)) return -1;
View
@@ -64,7 +64,7 @@ protected slots:
protected:
//! Return true if it's possible to read an entire line.
/*! @param from specifies the position to begin. */
- int canReadLine(const QByteArray &ba, int from = 0);
+ int isLine(const QByteArray &ba, int from = 0);
//! Called from readStdOut() and readTmpFile() to do all the work
void genericRead(QByteArray buffer);

0 comments on commit d3ca825

Please sign in to comment.