IterateV, IterateKV: provide override for the most common usage pattern
commit55143a857a3cf1c69841df1ce04a3055c7f3c944
authorJan Oravec <jan@fb.com>
Thu, 27 Feb 2020 17:25:16 +0000 (27 09:25 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 27 Feb 2020 17:31:05 +0000 (27 09:31 -0800)
tree769c32314f82cd64013c2577ce1f0154988cfb2a
parentdf04462d750ad490341387b0eedc626051ac9aad
IterateV, IterateKV: provide override for the most common usage pattern

Summary:
The most common usage is to iterate the input container for reading, where you
don't need to use any of these other lambdas.

The least common usage is using all the lambdas except the last one.

So, kill the least commonly used override, adding false explicitly to the call
sites using it. And add an override for the most commonly used pattern,
simplifying all the call sites.

Makes it possible to iterate containers without filling whole terminal screen
with lambdas.

Reviewed By: alexeyt

Differential Revision: D20130502

fbshipit-source-id: 22a9fcf6585d5d9b5b45d65e7e1845d848b50435
hphp/runtime/base/array-iterator.h
hphp/runtime/ext/array/ext_array.cpp
hphp/runtime/ext/collections/ext_collections-set.cpp
hphp/runtime/ext/thrift/compact.cpp
hphp/runtime/vm/bytecode.cpp