Commit 8099762
committed
Code Modernization: Utilize spaceship operator
Some replaced instances also fix a bug where the comparison function should have returned `0` as opposed to `1` or `-1` as used in ternaries. This results in a performance improvement.
Developed in WordPress#10717
Props soean, mukesh27, westonruter.
Fixes #64497.
git-svn-id: https://develop.svn.wordpress.org/trunk@61474 602fd350-edb4-49c9-b593-d223f7449a82<=> in sort comparison logic.1 parent fd2693d commit 8099762
5 files changed
Lines changed: 11 additions & 29 deletions
File tree
- src
- wp-admin/includes
- wp-includes
- interactivity-api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
314 | 308 | | |
315 | 309 | | |
316 | 310 | | |
| |||
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
470 | 464 | | |
471 | 465 | | |
472 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
| 330 | + | |
334 | 331 | | |
335 | | - | |
| 332 | + | |
336 | 333 | | |
337 | 334 | | |
338 | 335 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
| 907 | + | |
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
| 911 | + | |
915 | 912 | | |
916 | 913 | | |
917 | 914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2999 | 2999 | | |
3000 | 3000 | | |
3001 | 3001 | | |
3002 | | - | |
| 3002 | + | |
3003 | 3003 | | |
3004 | 3004 | | |
3005 | 3005 | | |
| |||
0 commit comments