mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Fix a coverity scan warning
Coverity scan warns about uninitialized 'sf' argument when calling probe(). Actually it is a false positive because argument is passed by reference and assigned inside probe(). Nevertheless it is a hint that fucntion signature is a bit tricky, so rewrite it in a more conventional way, assigning 'sf' from probe() return value. No functional change.
This commit is contained in:
+2
-2
@@ -113,8 +113,8 @@ class Endgames {
|
||||
public:
|
||||
Endgames();
|
||||
|
||||
template<typename T> T* probe(Key key, T** eg)
|
||||
{ return *eg = map<T>().count(key) ? map<T>()[key].get() : nullptr; }
|
||||
template<typename T, typename E = EndgameBase<T>> E* probe(Key key)
|
||||
{ return map<E>().count(key) ? map<E>()[key].get() : nullptr; }
|
||||
};
|
||||
|
||||
#endif // #ifndef ENDGAME_H_INCLUDED
|
||||
|
||||
Reference in New Issue
Block a user