Further simplifications to sqlite3AtoF() to remove unneeded branches.
FossilOrigin-Name: dd69e53cb077873171af5312c633ca185595bf31
This commit is contained in:
parent
e5f06fdc87
commit
15af62acff
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
|||||||
C Remove\san\sunnecessary\sline\sfrom\sthe\ssqlite3AtoF()\sroutine.
|
C Further\ssimplifications\sto\ssqlite3AtoF()\sto\sremove\sunneeded\sbranches.
|
||||||
D 2016-04-26T21:02:53.535
|
D 2016-04-26T23:14:45.113
|
||||||
F Makefile.in 9e816d0323e418fbc0f8b2c05fc14e0b3763d9e8
|
F Makefile.in 9e816d0323e418fbc0f8b2c05fc14e0b3763d9e8
|
||||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||||
F Makefile.msc 71b8b16cf9393f68e2e2035486ca104872558836
|
F Makefile.msc 71b8b16cf9393f68e2e2035486ca104872558836
|
||||||
@ -441,7 +441,7 @@ F src/treeview.c e4b41a37530a191579d3c53142cc44ee2eb99373
|
|||||||
F src/trigger.c e14840ee0c3e549e758ec9bf3e4146e166002280
|
F src/trigger.c e14840ee0c3e549e758ec9bf3e4146e166002280
|
||||||
F src/update.c 3e67ab3c0814635f355fb1f8ab010a2b9e016e7d
|
F src/update.c 3e67ab3c0814635f355fb1f8ab010a2b9e016e7d
|
||||||
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
|
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
|
||||||
F src/util.c 8ae5e894687fb90cb22a870284eb4a8d077f4f93
|
F src/util.c 7ea35eef53451786b4729d2a64ba9a8574a11e31
|
||||||
F src/vacuum.c feb1eabb20987983d9350cad98299b21fa811f52
|
F src/vacuum.c feb1eabb20987983d9350cad98299b21fa811f52
|
||||||
F src/vdbe.c d3843a66d74a7696477ee5141e5eb9a7e5e2401c
|
F src/vdbe.c d3843a66d74a7696477ee5141e5eb9a7e5e2401c
|
||||||
F src/vdbe.h 5591b5add447096e31288b5a0a78ec5d7b5c5170
|
F src/vdbe.h 5591b5add447096e31288b5a0a78ec5d7b5c5170
|
||||||
@ -1484,7 +1484,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 12418b100196abbfbfb85e0ab4bb6b1cbf335df7
|
P a9d007494cfe30a26dca5352655dc7702351476e
|
||||||
R 2a12fe749cf4b5592aed6dd4a1552e1f
|
R bdb81af968b0eff03040af96472e5367
|
||||||
U drh
|
U drh
|
||||||
Z ab5ecd1a857f2f93572fff644c4c92bc
|
Z 7162b1b4b927db763c29ab3a71a81028
|
||||||
|
@ -1 +1 @@
|
|||||||
a9d007494cfe30a26dca5352655dc7702351476e
|
dd69e53cb077873171af5312c633ca185595bf31
|
11
src/util.c
11
src/util.c
@ -400,12 +400,13 @@ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
|
|||||||
z+=incr;
|
z+=incr;
|
||||||
/* copy digits from after decimal to significand
|
/* copy digits from after decimal to significand
|
||||||
** (decrease exponent by d to shift decimal right) */
|
** (decrease exponent by d to shift decimal right) */
|
||||||
while( z<zEnd && sqlite3Isdigit(*z) && s<((LARGEST_INT64-9)/10) ){
|
while( z<zEnd && sqlite3Isdigit(*z) ){
|
||||||
s = s*10 + (*z - '0');
|
if( s<((LARGEST_INT64-9)/10) ){
|
||||||
z+=incr, nDigits++, d--;
|
s = s*10 + (*z - '0');
|
||||||
|
d--;
|
||||||
|
}
|
||||||
|
z+=incr, nDigits++;
|
||||||
}
|
}
|
||||||
/* skip non-significant digits */
|
|
||||||
while( z<zEnd && sqlite3Isdigit(*z) ) z+=incr, nDigits++;
|
|
||||||
}
|
}
|
||||||
if( z>=zEnd ) goto do_atof_calc;
|
if( z>=zEnd ) goto do_atof_calc;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user