Re: [Flightgear-devel] Patch for positioned.cxx

2009-02-23 Thread Geoff McLane
 not subscribed to the flightgear-cvslogs ML ? ;-)

No, was not, but am now!

Thanks Fred.

Geoff.



--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Patch for positioned.cxx

2009-02-22 Thread Geoff McLane
 Not that I have any objection to your patch, I just reacted to your
 question that you have no idea how gcc can compile this.

So, I simply hope some patch is added to 'help' those of us using the
MSVC compiler in native WIN32, under what ever switches are deemed
necessary, for whatever the reason... sorry I mentioned 'gcc' at
all ;=))

Who is going to apply a patch?

Geoff.



--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Patch for positioned.cxx

2009-02-22 Thread Csaba Halász
On Sun, Feb 22, 2009 at 7:46 PM, Geoff McLane ubu...@geoffair.info wrote:

 Who is going to apply a patch?

Frederic has already applied it when he wrote his email.

-- 
Csaba/Jester

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Patch for positioned.cxx

2009-02-22 Thread Frederic Bouvier
Geoff McLane a écrit :
 Not that I have any objection to your patch, I just reacted to your
 question that you have no idea how gcc can compile this.
 

 So, I simply hope some patch is added to 'help' those of us using the
 MSVC compiler in native WIN32, under what ever switches are deemed
 necessary, for whatever the reason... sorry I mentioned 'gcc' at
 all ;=))

 Who is going to apply a patch?

   

not subscribed to the flightgear-cvslogs ML ? ;-)

-Fred

-- 
Frédéric Bouvier
http://my.fotolia.com/frfoto/   Photo gallery
http://fgsd.sourceforge.net/FlightGear Scenery Designer


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Patch for positioned.cxx

2009-02-21 Thread Geoff McLane
Hi,

I have been applying this patch since sometime before Sep last year -
see -
http://geoffair.net/fg/txt/fgfs-047.patch.txt

IMHO the _MSC_VER and _DEBUG switches do NOT need to be applied. I am
forever puzzled how gcc resolves this since the comparison is indeed two
pointers ...

diff -ur CVS\FlightGear\source\src\Navaids\positioned.cxx FlightGear\src
\Navaids\positioned.cxx
--- CVS\FlightGear\source\src\Navaids\positioned.cxxMon Sep 08 21:25:45 2008
+++ FlightGear\src\Navaids\positioned.cxx   Sat Nov 01 19:02:22 2008
@@ -147,6 +147,10 @@
   {
 return a  b-type();
   }
+  bool operator()(const FGPositioned* a, const FGPositioned* b) const
+  {
+return a-type()  b-type();
+  }
 };
 
 static void

Hope this helps...

Regards,

Geoff.

On Sun, 2009-02-22 at 02:14 +0800, 黄志勇 wrote:
 Hi,
 Compiling the file positioned.cxx with MSVC in debug model, it have some 
 problems.
 but in release model , it have not.
 I think that it is the problem of implementation of STL by Microsoft in debug 
 model.
 So i add a method for class LowerLimitOfType, and it works.
 I'd be happy if someone considers commiting this.
 
 Thanks, ZhiYong Huang
 
 Index: positioned.cxx
 ===
 RCS file: /var/cvs/FlightGear-0.9/source/src/Navaids/positioned.cxx,v
 retrieving revision 1.12
 diff -u -r1.12 positioned.cxx
 --- positioned.cxx   9 Jan 2009 13:15:03 -   1.12
 +++ positioned.cxx   21 Feb 2009 17:54:27 -
 @@ -55,6 +55,9 @@
}
  };
  
 +typedef std::setFGPositioned*, OrderByType BucketEntry;
 +typedef std::maplong int, BucketEntry SpatialPositionedIndex;
 +
  class LowerLimitOfType
  {
  public:
 @@ -67,11 +70,16 @@
{
  return a  b-type();
}
 +#if defined(_MSC_VER)  defined(_DEBUG)
 +  bool operator()(const FGPositioned* a, const FGPositioned* b) const
 +  {
 + return a-type()  b-type();
 +  }
 +#endif
  };
  
  
 -typedef std::setFGPositioned*, OrderByType BucketEntry;
 -typedef std::maplong int, BucketEntry SpatialPositionedIndex;
 +
  
  static NamedPositionedIndex global_namedIndex;
  static SpatialPositionedIndex global_spatialIndex;
 
 
 
 
 
 __
 网易邮箱,中国第一大电子邮件服务商
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___ Flightgear-devel mailing list 
 Flightgear-devel@lists.sourceforge.net 
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Patch for positioned.cxx

2009-02-21 Thread Csaba Halász
On Sat, Feb 21, 2009 at 7:34 PM, Geoff McLane ubu...@geoffair.info wrote:

 IMHO the _MSC_VER and _DEBUG switches do NOT need to be applied. I am
 forever puzzled how gcc resolves this since the comparison is indeed two
 pointers ...

No it isn't. Both uses in lower_bound and upper_bound take an iterator
range and a const Type. So it is a pointer and a reference. gcc is
right.

-- 
Csaba/Jester

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Patch for positioned.cxx

2009-02-20 Thread Frederic Bouvier
- 黄志勇 a écrit :

 Sorry, in Microsoft Windows, there have not patch tool. I just can do
 like this.

If you use cvs :

cvs diff -u my_file.cxx

Or use TortoiseCVS to do the diff

-Fred

-- 
Frédéric Bouvier
http://my.fotolia.com/frfoto/  Photo gallery - album photo
http://fgsd.sourceforge.net/   FlightGear Scenery Designer


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel