Define conflict with opencv 2.1.1
toeklk opened this issue · comments
migrated from Bugzilla #775
status NEW severity critical in component core for ---
Reported in version trunk on platform All
Assigned to: BFL mailinglist
On 2010-07-07 10:19:04 +0200, Norbert Schmitz wrote:
Hello, the define DEFAULT in src/pdf/pdf.h collides with an enum in the opencv 2.1.1 (both versions are trunk versions) Therefore I propose to use static const int instead of defines. This is proposed by Effective C++ and reduces possible collisions. A patch against pdf.h could be Index: src/pdf/pdf.h =================================================================== --- src/pdf/pdf.h (Revision 32178) +++ src/pdf/pdf.h (Arbeitskopie) @@ -44,10 +44,14 @@ using namespace std; // Defines for different sampling methods -#define DEFAULT 0 // Default sampling method, must be valid for every PDF!! -#define BOXMULLER 1 -#define CHOLESKY 2 -#define RIPLEY 3 // For efficient sampling from discrete/mcpdfs +static const int DEFAULT = 0; +static const int BOXMULLER = 1; +static const int CHOLESKY = 2; +static const int RIPLEY = 3; /// Class PDF: Virtual Base class representing Probability Density Functions template (typename T) class Pdf Thanks for your work. Yours Norbert Schmitz