Replace one unfortunate hack with a somewhat better one. The included...

Replace one unfortunate hack with a somewhat better one. The included atlctrlx.h relies on min and max macros, which are generally bad and especially so in combination with STL.

BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6298014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72496 0039d316-1c4b-4281-b951-d872f2087c98
parent 0b885b53
......@@ -5,16 +5,7 @@
#include "chrome_frame/ready_mode/internal/ready_prompt_window.h"
#include <atlctrls.h>
#include <Shellapi.h> // Must appear before atlctrlx.h
// These seem to be required by atlctrlx?
template<class A>
A min(A const& a, A const& b) { return a < b ? a : b; }
template<class A>
A max(A const& a, A const& b) { return a > b ? a : b; }
#include <atlctrlx.h>
#include <Shellapi.h>
#include "base/compiler_specific.h"
#include "base/win/scoped_bstr.h"
......@@ -24,6 +15,13 @@ A max(A const& a, A const& b) { return a > b ? a : b; }
#include "chrome_frame/simple_resource_loader.h"
#include "grit/chromium_strings.h"
// atlctrlx.h requires 'min' and 'max' macros, the definition of which conflicts
// with STL headers. Hence we include them out of the order defined by style
// guidelines. As a result you may not refer to std::min or std::max in this
// file.
#include <minmax.h> // NOLINT
#include <atlctrlx.h> // NOLINT
ReadyPromptWindow::ReadyPromptWindow(
InfobarContent::Frame* frame, ReadyModeState* ready_mode_state,
UrlLauncher* url_launcher)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment