From: Marco Costalba Date: Wed, 22 Aug 2012 10:44:43 +0000 (+0100) Subject: Use size_t as operator[] argument type X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=7a2825053e3eb5204e6b45d0cadb9264e77ac69f;hp=4e619a13d6671db198bc9c39d54dd7f243ef5873;ds=sidebyside Use size_t as operator[] argument type This better mimics std::vector::operator[] and fixes a warning with MSVC 64bit. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/thread.h b/src/thread.h index 96ad121e..ad40a341 100644 --- a/src/thread.h +++ b/src/thread.h @@ -108,7 +108,7 @@ public: void init(); // No c'tor, Threads object is global and engine shall be fully initialized ~ThreadPool(); - Thread& operator[](int id) { return *threads[id]; } + Thread& operator[](size_t id) { return *threads[id]; } bool use_sleeping_threads() const { return useSleepingThreads; } int min_split_depth() const { return minimumSplitDepth; } size_t size() const { return threads.size(); }