[x264-devel] Re: x264 for g++ compiler on r239
Måns Rullgård
mru at inprovide.com
Wed May 25 14:08:53 CEST 2005
"Stephen Henry" <Stephen.Henry at elixent.com> writes:
> I would, personally like to see this as well since I am planning to use
> x264 in a SystemC (C++ library for SOC) type environment. I'm not
> suggesting that development should switch to C++ all of a sudden (OOP
> and all...), but I would like to see the default x264 branch able to
> compile under both gcc and g++ without modification. When I've done this
> in the past, the only differences required was slight modifications to
> some casts (which gcc allows, because the C-language is less pedantic
> about such things) and none of #define statements in the code that was
> suggested. This has generally resulted in much tighter code as sometimes
> GCC was allowing casts from, say unsigned to signed, or other such
> things without creating a warning.
There's no reason to compile C code with a C++ compiler. A separate
C++ wrapper is a much better solution. Those casts required by C++
are actually a bad thing to do in C, as they will hide some potential
errors.
> I do think that rewriting x264 in C++ would be really nice, but I don't
> see the benefit from doing so: the code is already really well
> structured, and the task of converting everything to classes would be,
> IMHO, redundant.
Agreed.
--
Måns Rullgård
mru at inprovide.com
--
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html
More information about the x264-devel
mailing list