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
Showing
Please register or sign in to comment