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.cxx    Mon 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 -0000   1.12
> +++ positioned.cxx   21 Feb 2009 17:54:27 -0000
> @@ -55,6 +55,9 @@
>    }
>  };
>  
> +typedef std::set<FGPositioned*, OrderByType> BucketEntry;
> +typedef std::map<long 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::set<FGPositioned*, OrderByType> BucketEntry;
> -typedef std::map<long 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

Reply via email to