]> git.sesse.net Git - stockfish/commit
Templetize functions to get pieces by type
authorMarco Costalba <mcostalba@gmail.com>
Mon, 31 Aug 2009 15:07:03 +0000 (17:07 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 4 Sep 2009 07:21:05 +0000 (08:21 +0100)
commit76bed11f7b79d939c250c02d73d0c1e2628e7a17
tree08379d67ce0a48e0762a241c89ebc454a22d4826
parente33c94883fb1767a8aae29e8004d0621d296e33b
Templetize functions to get pieces by type

Use a single template to get bitboard representation of
the position given the type of piece as a constant.

This removes almost 80 lines of code and introduces an
uniform notation to be used for querying for piece type.

No functional change and no performance change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/endgame.cpp
src/evaluate.cpp
src/material.cpp
src/movegen.cpp
src/pawns.cpp
src/piece.h
src/position.cpp
src/position.h