[Debian-astro-commits] [gyoto] 210/221: yorick: fix bug bug in dimension calculation of impactcoords when addressing sceneray with angles

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

thibaut pushed a commit to branch master
in repository gyoto.

commit 8efb25243c99776ed1cd49777385d20b69cf69e9
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date:   Wed Apr 8 08:00:08 2015 +0200

    yorick: fix bug bug in dimension calculation of impactcoords when addressing sceneray with angles
---
 yorick/gyoto_Scenery.C | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/yorick/gyoto_Scenery.C b/yorick/gyoto_Scenery.C
index c87ad58..1abb88a 100644
--- a/yorick/gyoto_Scenery.C
+++ b/yorick/gyoto_Scenery.C
@@ -191,6 +191,9 @@ extern "C" {
       long ndims, dims[Y_DIMSIZE]={0};
       long nelem;
 
+      dims[0]=0;
+      if (precompute)       dims[++dims[0]]=16;
+
       if (i_idx.isDouble() || j_idx.isDouble()) {
 	if (!i_idx.isDouble() || !j_idx.isDouble())
 	  throwError("i and j must be of same type (double or long)");
@@ -204,11 +207,9 @@ extern "C" {
 	  }
 	  else throwError("alpha and delta must be conformable");
 	}
-	for (int m=0; m<idims[0]+1; ++m) dims[m]=idims[m];
+	for (int m=1; m<=idims[0]; ++m) dims[++dims[0]]=idims[m];
       } else {
 	nelem=i_idx.getNElements()*j_idx.getNElements();
-	dims[0]=0;
-	if (precompute)       dims[++dims[0]]=16;
 	if ( (precompute + i_idx.getDims()[0]+j_idx.getDims()[0]) >= Y_DIMSIZE )
 	  throwError("Too many dimensions");
 	long const *idims=i_idx.getDims();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git



More information about the Debian-astro-commits mailing list