]> git.sesse.net Git - stockfish/commit
Workaround value-initialization in MSVC
authorMarco Costalba <mcostalba@gmail.com>
Fri, 8 Feb 2013 07:49:36 +0000 (08:49 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 8 Feb 2013 08:20:40 +0000 (09:20 +0100)
commit50a7200b18e96a6f0e2c2ee7fda017ea6f2f1c1f
treee604c2e6296ecd43edb7173e1aea5bc01e7bcb6d
parentc67fb8ef04439dbd208bfcd53a89367372ef84e7
Workaround value-initialization in MSVC

The syntax splitPoints() should force the compiler to
value-initialize the array and because there is no
user defined c'tor it falls back on zero-initialization.

Unfortunatly this is broken in MSVC compilers, because
value initialization for non-POD types is not supported,
so left splitPoints un-initialized and add in split()
initialization of slavesPositions, that is the only
member not already set at split time.

This fixes an assert under MSVC when running with
more than one thread.

Spotted and reported by Jundery.

No functional change.
src/thread.cpp