/ Check-in [773c5c1d]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug in the geopoly_ccw() function. Test cases in TH3.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 773c5c1d9c0ec40c51949c38c9dc17e778086f3f92791cca9b85288de0076dab
User & Date: drh 2018-11-24 20:44:46
Context
2018-11-26
15:00
Minor comment enhancement in alter.c. No changes to code. check-in: 12920bcb user: drh tags: trunk
07:21
Merge latest trunk changes into this branch. check-in: 28a615a2 user: dan tags: begin-concurrent
2018-11-24
20:44
Fix a bug in the geopoly_ccw() function. Test cases in TH3. check-in: 773c5c1d user: drh tags: trunk
17:46
Make the winTruncate() method of the windows VFS be a no-op if there are outstanding references to the memory-mapped pages. Otherwise, memory might be deleted out from under those references when the file is remapped during the truncate operation. check-in: ffce4aac user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to ext/rtree/geopoly.c.

523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
  int argc,
  sqlite3_value **argv
){
  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
  if( p ){
    if( geopolyArea(p)<0.0 ){
      int ii, jj;
      for(ii=2, jj=p->nVertex*2 - 4; ii<jj; ii+=2, jj-=2){
        GeoCoord t = p->a[ii];
        p->a[ii] = p->a[jj];
        p->a[jj] = t;
        t = p->a[ii+1];
        p->a[ii+1] = p->a[jj+1];
        p->a[jj+1] = t;
      }







|







523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
  int argc,
  sqlite3_value **argv
){
  GeoPoly *p = geopolyFuncParam(context, argv[0], 0);
  if( p ){
    if( geopolyArea(p)<0.0 ){
      int ii, jj;
      for(ii=2, jj=p->nVertex*2 - 2; ii<jj; ii+=2, jj-=2){
        GeoCoord t = p->a[ii];
        p->a[ii] = p->a[jj];
        p->a[jj] = t;
        t = p->a[ii+1];
        p->a[ii+1] = p->a[jj+1];
        p->a[jj+1] = t;
      }