title: warning C4003: not enough actual parameters for macro 'max' - Visual Studio 2010 C++
body: <p>I have the following warnings while compiling an openFrameworks 007 project on Visual Studio 2010 SP1:</p>
  
  <pre><code>d:\pedro\development\videoflow\openframeworks\libs\openframeworks\types\ofcolor.h(127): warning C4003: not enough actual parameters for macro 'max'
  d:\pedro\development\videoflow\openframeworks\libs\openframeworks\types\ofcolor.h(128): warning C4003: not enough actual parameters for macro 'max'
  d:\pedro\development\videoflow\openframeworks\libs\openframeworks\graphics\ofpixels.h(150): warning C4003: not enough actual parameters for macro 'max'
  d:\pedro\development\videoflow\openframeworks\libs\openframeworks\graphics\ofpixels.h(151): warning C4003: not enough actual parameters for macro 'max'
  </code></pre>
  
  <p>From what I could tell this warnings are usually followed by errors but in my case everything works ok. The affected code is below:</p>
  
  <pre><code>const float srcMax = ( (sizeof(SrcType) == sizeof(float) ) ? 1.f : numeric_limits&lt;SrcType&gt;::max() );
  const float dstMax = ( (sizeof(PixelType) == sizeof(float) ) ? 1.f : numeric_limits&lt;PixelType&gt;::max() );
  </code></pre>
  
  <p>I tried to set NOMINMAX on the preprocessor but since openFrameworks also defines NOMINMAX on ofConstants.h I get a bunch of warnings that NOMINMAX is already defined.</p>
  
  <p>I have tried to define NOMINMAX on the affected openFrameworks files but it results on the same warning (in fact if I analyze the files included on ofColor.h and ofPixel.h they end up including ofConstants.h so NOMINMAX should be defined).</p>
  
  <p>Any idea on how to solve this? If you don't... what would be best? This warnings or a bunch of warnings that NOMINMAX is already defined?</p>
  
  <p>EDIT:</p>
  
  <p>BTW when I talked about errors I was talking about these: <a href="https://stackoverflow.com/questions/1904635/warning-c4003-and-errors-c2589-and-c2059-on-x-stdnumeric-limitsintmax">warning C4003 and errors C2589 and C2059 on: x = std::numeric_limits&lt;int&gt;::max();</a></p>
  
  <p>I get this (the warning plus 2 errors) if I try to reproduce the problem on a clean C++ project. But on my openFrameworks project I just get the warnings. That's why I get confused!!</p>