folly/FBVector.h: avoid -Wsign-compare error (simple)
authorJim Meyering <meyering@fb.com>
Wed, 7 Jan 2015 01:21:42 +0000 (17:21 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:04 +0000 (11:01 -0800)
commitb6c430e1dea510e56cc170bdcf68018c6ad083c3
tree2a06d8671424432804c53e55bbb256dc5fc7954b
parentc7e25e1a69d9ce7a8b9292065bf9f88faaaae6a7
folly/FBVector.h: avoid -Wsign-compare error (simple)

Summary:
* folly/FBVector.h (make_window): Declare "tail" to be
explicitly of the same type as "n".  Otherwise, we'd
use the type of std::distance, which is unsigned, and
then compare that against "n" of type "size_type", which
is unsigned, and we'd get this from gcc-4.9:
folly/FBVector.h:1276:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

Test Plan:
Run this and note there are fewer errors than before:
fbconfig --platform-all=gcc-4.9-glibc-2.20 -r folly && fbmake dbgo

Reviewed By: philipp@fb.com, andrei.alexandrescu@fb.com

Subscribers: trunkagent, njormrod, folly-diffs@

FB internal diff: D1768346

Tasks: 5941250

Signature: t1:1768346:1420594452:654dac805bb46f7c6a38b4e4102e4004720d6835
folly/FBVector.h