Commit ba38186
committed
Simplify implementation of _is_sorted.
We don't need a separate specialization for ints (we can rely on the
compiler to inline isnan<int> as always false), and having a separate
loop to find the first non-nan value isn't necessary either.
One change in behavior this causes (in this private function) is that a
fully nan input is considered as being sorted, but this is consistent
with empty inputs being considered sorted too, and also OK with the
actual use of the function (determine whether to go through a fast path
in drawing lines -- fully nan lines are not drawn anyways).1 parent ccbd641 commit ba38186
2 files changed
+24
-93
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1244 | 1244 | | |
1245 | 1245 | | |
1246 | 1246 | | |
1247 | | - | |
| 1247 | + | |
1248 | 1248 | | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
1302 | 1259 | | |
1303 | 1260 | | |
1304 | | - | |
| 1261 | + | |
1305 | 1262 | | |
1306 | | - | |
1307 | | - | |
1308 | 1263 | | |
| 1264 | + | |
1309 | 1265 | | |
1310 | 1266 | | |
1311 | 1267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
| 810 | + | |
811 | 811 | | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
| 812 | + | |
816 | 813 | | |
817 | | - | |
818 | 814 | | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
| 815 | + | |
823 | 816 | | |
824 | | - | |
825 | 817 | | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
| 818 | + | |
830 | 819 | | |
831 | | - | |
832 | 820 | | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
| 821 | + | |
837 | 822 | | |
838 | | - | |
839 | 823 | | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
| 824 | + | |
844 | 825 | | |
845 | | - | |
846 | 826 | | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
857 | 831 | | |
| 832 | + | |
858 | 833 | | |
859 | 834 | | |
860 | 835 | | |
| |||
0 commit comments