mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Fixed some warnings when using -Weffc++ gcc option
Plus some other icc warnings popped up with new and strictier compile options. No functional and speed change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
d664773a83
commit
85a7456bd7
6 changed files with 15 additions and 6 deletions
|
@ -219,14 +219,14 @@ ifeq ($(COMP),icc)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
### 3.2 General compiler settings
|
### 3.2 General compiler settings
|
||||||
CXXFLAGS = -g -Wall -Wcast-qual -ansi -fno-exceptions -fno-rtti $(EXTRACXXFLAGS)
|
CXXFLAGS = -g -Wall -Wcast-qual -fno-exceptions -fno-rtti $(EXTRACXXFLAGS)
|
||||||
|
|
||||||
ifeq ($(comp),gcc)
|
ifeq ($(comp),gcc)
|
||||||
CXXFLAGS += -pedantic -Wno-long-long -Wextra
|
CXXFLAGS += -ansi -pedantic -Wno-long-long -Wextra
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(comp),icc)
|
ifeq ($(comp),icc)
|
||||||
CXXFLAGS += -wd383,869,981,10187,10188,11505,11503
|
CXXFLAGS += -wd383,981,10187,10188,11505,11503 -Wcheck -Wabi -Wdeprecated -strict-ansi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(os),osx)
|
ifeq ($(os),osx)
|
||||||
|
|
|
@ -241,7 +241,7 @@ namespace {
|
||||||
template<Color Us>
|
template<Color Us>
|
||||||
Score evaluate_passed_pawns(const Position& pos, EvalInfo& ei);
|
Score evaluate_passed_pawns(const Position& pos, EvalInfo& ei);
|
||||||
|
|
||||||
Score apply_weight(Score v, Score weight);
|
inline Score apply_weight(Score v, Score weight);
|
||||||
Value scale_by_game_phase(const Score& v, Phase ph, ScaleFactor sf);
|
Value scale_by_game_phase(const Score& v, Phase ph, ScaleFactor sf);
|
||||||
Score weight_option(const std::string& mgOpt, const std::string& egOpt, Score internalWeight);
|
Score weight_option(const std::string& mgOpt, const std::string& egOpt, Score internalWeight);
|
||||||
void init_safety();
|
void init_safety();
|
||||||
|
|
|
@ -75,6 +75,9 @@ class EndgameFunctions;
|
||||||
|
|
||||||
class MaterialInfoTable {
|
class MaterialInfoTable {
|
||||||
|
|
||||||
|
MaterialInfoTable(const MaterialInfoTable&);
|
||||||
|
MaterialInfoTable& operator=(const MaterialInfoTable&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MaterialInfoTable();
|
MaterialInfoTable();
|
||||||
~MaterialInfoTable();
|
~MaterialInfoTable();
|
||||||
|
|
|
@ -78,6 +78,9 @@ class PawnInfoTable {
|
||||||
|
|
||||||
enum SideType { KingSide, QueenSide };
|
enum SideType { KingSide, QueenSide };
|
||||||
|
|
||||||
|
PawnInfoTable(const PawnInfoTable&);
|
||||||
|
PawnInfoTable& operator=(const PawnInfoTable&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PawnInfoTable();
|
PawnInfoTable();
|
||||||
~PawnInfoTable();
|
~PawnInfoTable();
|
||||||
|
|
3
src/tt.h
3
src/tt.h
|
@ -102,6 +102,9 @@ struct TTCluster {
|
||||||
|
|
||||||
class TranspositionTable {
|
class TranspositionTable {
|
||||||
|
|
||||||
|
TranspositionTable(const TranspositionTable&);
|
||||||
|
TranspositionTable& operator=(const TranspositionTable&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TranspositionTable();
|
TranspositionTable();
|
||||||
~TranspositionTable();
|
~TranspositionTable();
|
||||||
|
|
|
@ -150,10 +150,10 @@ template<typename T>
|
||||||
inline T operator- (const T d) { OK(T); return T(-int(d)); }
|
inline T operator- (const T d) { OK(T); return T(-int(d)); }
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void operator++ (T& d, int) { OK(T); d = T(int(d) + 1); }
|
inline T operator++ (T& d, int) { OK(T); d = T(int(d) + 1); return d; }
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void operator-- (T& d, int) { OK(T); d = T(int(d) - 1); }
|
inline T operator-- (T& d, int) { OK(T); d = T(int(d) - 1); return d; }
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline void operator+= (T& d1, const T d2) { OK(T); d1 = d1 + d2; }
|
inline void operator+= (T& d1, const T d2) { OK(T); d1 = d1 + d2; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue