Windows: Fix VS2008SP1 compiler errors (issue #1758)

- override was being defined but this compiler doesn't support it.
- Warning C4355 wasn't being properly suppressed in cef_resource_manager.cc
This commit is contained in:
Marshall Greenblatt 2015-11-13 11:19:24 -05:00
parent 07d75e540f
commit 694b45717c
3 changed files with 7 additions and 2 deletions

View File

@ -175,7 +175,10 @@
// C++11 support may not be enabled in client applications. CEF internal classes
// should use the `override` keyword directly.
#ifndef OVERRIDE
#if defined(__clang__) || defined(COMPILER_MSVC)
#if defined(__clang__)
#define OVERRIDE override
#elif defined(COMPILER_MSVC) && _MSC_VER >= 1600
// Visual Studio 2010 and later support override.
#define OVERRIDE override
#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700

View File

@ -41,6 +41,7 @@
// updated to match.
#include <stddef.h> // For size_t.
#include "include/base/cef_build.h" // For COMPILER_MSVC
#if !defined(ALLOW_THIS_IN_INITIALIZER_LIST)
#if defined(COMPILER_MSVC)

View File

@ -7,6 +7,7 @@
#include <algorithm>
#include <vector>
#include "include/base/cef_macros.h"
#include "include/base/cef_weak_ptr.h"
#include "include/cef_parser.h"
#include "include/wrapper/cef_stream_resource_handler.h"
@ -182,7 +183,7 @@ class ArchiveProvider : public CefResourceManager::Provider {
password_(password),
archive_load_started_(false),
archive_load_ended_(false),
weak_ptr_factory_(this) {
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
DCHECK(!url_path_.empty());
DCHECK(!archive_path_.empty());