Minor optimisations in select.cc's match_ids function
authorRupert Swarbrick <rswarbrick@gmail.com>
Wed, 27 May 2020 08:36:33 +0000 (09:36 +0100)
committerRupert Swarbrick <rswarbrick@gmail.com>
Wed, 27 May 2020 08:36:33 +0000 (09:36 +0100)
commit061d1f0c07623d741e56a36e7a3e5cd48da30d5a
tree4a1e5e4e8fe4ebb1c5c88142016f00f36abf5351
parent0d9beb5b2eec3ba839faa58a1a775311d9c3376c
Minor optimisations in select.cc's match_ids function

  - Pass a string argument by reference

  - Avoid multiple calls to IdString::str and IdString::c_str

  - Avoid combining checks for size > 0 and first char (C strings are
    null terminated, so foo[0] != '\0' implies that foo has positive
    length)
passes/cmds/select.cc