Skip to content

Commit 86baad3

Browse files
committed
[+] Built with clang
1 parent 375b0c4 commit 86baad3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
22
PROJECT (libslave)
33

44
# Build flags
5-
IF (CMAKE_COMPILER_IS_GNUCC)
5+
IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
6+
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
67
# Common options
78
ADD_DEFINITIONS (-pipe)
89
ADD_DEFINITIONS (-Wall)
910
ADD_DEFINITIONS (-O2)
1011
ADD_DEFINITIONS (-std=c++11)
1112
ADD_DEFINITIONS (-DUSE_PSI_1)
1213
ADD_DEFINITIONS (-DHAVE_PSI_1)
13-
ENDIF (CMAKE_COMPILER_IS_GNUCC)
14+
ENDIF ()
1415

1516
FIND_PACKAGE (Boost REQUIRED)
1617
INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})

Slave.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,6 @@ void Slave::generateSlaveId()
10251025

10261026
while (1) {
10271027

1028-
if (serveroid < 0) serveroid = -serveroid;
1029-
10301028
if (server_ids.count(serveroid) != 0) {
10311029
serveroid++;
10321030
} else {

collate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace nanomysql
88
{
9-
struct Connection;
9+
class Connection;
1010
}
1111

1212
namespace slave

0 commit comments

Comments
 (0)