Michael,

I would say it crashes for both versions if the jpeg is empty. But it 
never should. Anyway, the code is lousy. It needs a review badly, and as 
I have to link to the Qt lib anyway I should use Qt's container classes. 
I will have a look t at it in the future. For now I will leave it as is.

Oliver


>

>> hm replacing the vector container with a string... Not my favorite. I
>> fixed the vector::data() access. I don't like that way either, but
>> it's used more often. Let's hope it always works.
>
> I think the behaviour is now undefined for empty vectors, while the
> basic_string hack gives sane results even in this case.
>
> Other than that, I think both ways are ok. It's up to you ;-)
>
> Michael
>
>> I committed the stuff to svn trunk.
>>
>> Oliver
>>
>>>
>>>> seems to be a compatibility problem of the gcc used by OS X.
>>>
>>> well, vector::data() is just not in the Standard Library (yet):
>>> http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#464
>>>
>>>> Can you find an alternative way to access the data of std::vector as a
>>>> block and send a patch?
>>>
>>> sure:
>>>
>>> --- 3rdparty/map2gcm/main.cpp.orig 2011-05-19 21:25:12.000000000 +0200
>>> +++ 3rdparty/map2gcm/main.cpp 2011-05-20 22:44:15.000000000 +0200
>>> @@ -141,7 +141,7 @@
>>> /// tile buffer for 32 bit raw RGBA tiles
>>> static uint32_t tileBuf32Bit[MAX_TILE_SIZE * MAX_TILE_SIZE] = {0};
>>> ///
>>> -static std::vector<JOCTET> jpgbuf;
>>> +static std::basic_string<JOCTET> jpgbuf;
>>>
>>> static double distance(const double u1, const double v1, const double
>>> u2, const double v2)
>>> {
>>>
>>> Regards,
>>> Michael
>>>
>>>> Thanks
>>>>
>>>> Oliver
>>>>
>>>> -------- Original-Nachricht --------
>>>>> Datum: Thu, 19 May 2011 23:49:03 +0200 (CEST)
>>>>> Von: Michael Klein <[email protected]>
>>>>> An: QLandkarte GT <[email protected]>
>>>>> Betreff: Re: [Qlandkartegt-users] Release V 1.1.2
>>>>
>>>>> Doesn't compile here (OS X 10.5, Apple gcc 4.0.1):
>>>>>
>>>>> 3rdparty/map2gcm/main.cpp:676: error: 'class std::vector<JOCTET,
>>>>> std::allocator<JOCTET> >' has no member named 'data'
>>>>> make[2]: *** [3rdparty/map2gcm/CMakeFiles/map2gcm.dir/main.cpp.o]
>>>>> Error 1
>>>>> make[1]: *** [3rdparty/map2gcm/CMakeFiles/map2gcm.dir/all] Error 2
>>>>> make: *** [all] Error 2
>>>>>
>>>>> vector::data() is non-standard.
>>>>>
>>>>> Regards,
>>>>> Michael
>>>>>
>>>>> --
>>>>> fjelljo.puffin.lb.shuttle.de:~ > uptime
>>>>> 23:44 up 6 days, 2:26, 4 users, load averages: 1.55 2.05 2.07
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> What Every C/C++ and Fortran developer Should Know!
>>>>> Read this article and learn how Intel has extended the reach of its
>>>>> next-generation tools to help Windows* and Linux* C/C++ and Fortran
>>>>> developers boost performance applications - including clusters.
>>>>> http://p.sf.net/sfu/intel-dev2devmay
>>>>> _______________________________________________
>>>>> Qlandkartegt-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
>>>>
>>>
>>
>>
>


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to