mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Cleanup comments
Tests used to derive some Elo worth comments: https://tests.stockfishchess.org/tests/view/656a7f4e136acbc573555a31 https://tests.stockfishchess.org/tests/view/6585fb455457644dc984620f closes https://github.com/official-stockfish/Stockfish/pull/4945 No functional change
This commit is contained in:
@@ -112,7 +112,7 @@ inline IntType read_little_endian(std::istream& stream) {
|
||||
|
||||
// Utility to write an integer (signed or unsigned, any size)
|
||||
// to a stream in little-endian order. We swap the byte order before the write if
|
||||
// necessary to always write in little endian order, independently of the byte
|
||||
// necessary to always write in little-endian order, independently of the byte
|
||||
// ordering of the compiling machine.
|
||||
template<typename IntType>
|
||||
inline void write_little_endian(std::ostream& stream, IntType value) {
|
||||
@@ -141,8 +141,8 @@ inline void write_little_endian(std::ostream& stream, IntType value) {
|
||||
}
|
||||
|
||||
|
||||
// Read integers in bulk from a little indian stream.
|
||||
// This reads N integers from stream s and put them in array out.
|
||||
// Read integers in bulk from a little-endian stream.
|
||||
// This reads N integers from stream s and puts them in array out.
|
||||
template<typename IntType>
|
||||
inline void read_little_endian(std::istream& stream, IntType* out, std::size_t count) {
|
||||
if (IsLittleEndian)
|
||||
@@ -153,7 +153,7 @@ inline void read_little_endian(std::istream& stream, IntType* out, std::size_t c
|
||||
}
|
||||
|
||||
|
||||
// Write integers in bulk to a little indian stream.
|
||||
// Write integers in bulk to a little-endian stream.
|
||||
// This takes N integers from array values and writes them on stream s.
|
||||
template<typename IntType>
|
||||
inline void write_little_endian(std::ostream& stream, const IntType* values, std::size_t count) {
|
||||
@@ -165,8 +165,8 @@ inline void write_little_endian(std::ostream& stream, const IntType* values, std
|
||||
}
|
||||
|
||||
|
||||
// Read N signed integers from the stream s, putting them in
|
||||
// the array out. The stream is assumed to be compressed using the signed LEB128 format.
|
||||
// Read N signed integers from the stream s, putting them in the array out.
|
||||
// The stream is assumed to be compressed using the signed LEB128 format.
|
||||
// See https://en.wikipedia.org/wiki/LEB128 for a description of the compression scheme.
|
||||
template<typename IntType>
|
||||
inline void read_leb_128(std::istream& stream, IntType* out, std::size_t count) {
|
||||
@@ -216,8 +216,8 @@ inline void read_leb_128(std::istream& stream, IntType* out, std::size_t count)
|
||||
|
||||
|
||||
// Write signed integers to a stream with LEB128 compression.
|
||||
// This takes N integers from array values, compress them with the LEB128 algorithm and
|
||||
// writes the result on the stream s.
|
||||
// This takes N integers from array values, compresses them with
|
||||
// the LEB128 algorithm and writes the result on the stream s.
|
||||
// See https://en.wikipedia.org/wiki/LEB128 for a description of the compression scheme.
|
||||
template<typename IntType>
|
||||
inline void write_leb_128(std::ostream& stream, const IntType* values, std::size_t count) {
|
||||
|
||||
Reference in New Issue
Block a user