Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some small changes #1524

Closed
wants to merge 1 commit into from

Conversation

mstembera
Copy link
Contributor

  1. Use make_bitboard() in Bitboards::init()

  2. Remove code and improve reuse in position.h. Also more general since pieces() can now be called
    with more than just 2 arguments.
    (inspired by make_bitboard(...))

  3. Fix MSVC warning:
    search.h(85): warning C4244: '=': conversion from 'TimePoint' to 'int', possible loss of data

No functional change. Same speed.
bench: 5568461

2) Better code reuse and generalization in position.h
(inspired by make_bitboard(...))

3) Fix MSVC warning:
search.h(85): warning C4244: '=': conversion from 'TimePoint' to 'int', possible loss of data

No functional change.  Same speed.
bench: 5568461
@mcostalba
Copy link

mcostalba commented Mar 31, 2018

Number 2 is not needed. I think it is a good guidleline to implement just what is needed, this is a rule I followed (maybe too strict) in the past and it prevented me to add a lot of useless boilerplate code.

@mstembera
Copy link
Contributor Author

@mcostalba I agree about only what is needed but want to point out that in this case the bit of extra general functionality is only a bonus side effect. The goal was to reduce code which it does.

@snicolet snicolet closed this in 76f9cd4 Apr 1, 2018
@snicolet
Copy link
Member

snicolet commented Apr 1, 2018

@mstembera I have merged the non-controversial parts of the pull request in 76f9cd4, thanks!

The (b) part could be an independent commit -- or a part of a larger commit if you
find that it helps to write better code in evaluate.cpp or search.cpp, for example.

joergoster pushed a commit to joergoster/Stockfish-old that referenced this pull request Apr 1, 2018
1) Use make_bitboard() in Bitboards::init()

2) Fix MSVC warning: search.h(85): warning C4244: '=': conversion from
   'TimePoint' to 'int', possible loss of data.

Closes official-stockfish/Stockfish#1524

No functional change.
goodkov pushed a commit to goodkov/Stockfish that referenced this pull request Jul 21, 2018
1) Use make_bitboard() in Bitboards::init()

2) Fix MSVC warning: search.h(85): warning C4244: '=': conversion from
   'TimePoint' to 'int', possible loss of data.

Closes official-stockfish#1524

No functional change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants