-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#26496210: UNNECESSARY LOOPS THROUGH VECTORS OF SIZE 1
JSON_ARRAY_APPEND, JSON_INSERT and JSON_ARRAY_INSERT reject path arguments that may match more than one value. Still, they loop over the vector of search results, whose size is known to be 1. For historical reasons, they even iterate over it backwards. This patch simplifies the code by removing the backwards iteration over the vector. Instead, the first element of the vector is accessed directly. Change-Id: Idc9d3b7c594f0ad3bd8424af5fbeb76eee35ca8e
- Loading branch information
Showing
1 changed file
with
105 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters