Message: Re: graphics_reps\src\BooleanProcessor.src question Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: graphics_reps\src\BooleanProcessor.src question 

Forum: Geometry
Re: Question graphics_reps\src\BooleanProcessor.src question (Elena Novikova)
Date: 27 Jan, 2012
From: John Allison <John Allison>

Dear Elena

Thankyou for your diligent investigations.

 -(edges.size()+1)

indeed makes big assumptions about conversions from unsigned to int. However, my compiler shows that all is well:

#include <iostream>
using namespace std;
int Question(int i)
{
  cout << " Question: i: " << i << endl;
}
main()
{
  size_t i = 5;
  cout << " i: " << i << endl;
  cout << " -(i+1): " << -(i+1) << endl;
  cout << " int(-(i+1))): " << int(-(i+1)) << endl;
  cout << " -(int(i)+1): " << -(int(i)+1) << endl;
  Question(-(i+1));
}

gives

 i: 5
 -(i+1): 18446744073709551610
 int(-(i+1))): -6
 -(int(i)+1): -6
 Question: i: -6

Like function Question above, ExtEdge expects int (in all its arguments):

  ExtEdge(int k1=0, int k2=0, int kface1=0, int kface2=0, int kvis=0)

so all should be well.

However, we take your point and will make this conversion explicit.

Many thanks.

John

 Add Message Add Message
to: "Re: graphics_reps\src\BooleanProcessor.src question"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]