Commit 90fd74c1 authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Remove inconsistent throw() specifications in openvr

Building Chrome with /permissive- (a fussy variant in the VC++ compiler)
reports warnings in openvr because exception specifications were removed
from jsoncpp.cpp but not from json.h. The error is:

    jsoncpp.cpp(2599): warning C5043: 'Json::Exception::what':
    exception specification does not match previous declaration

Removing the throw() specifications from json.h restores consistency and
is what was originally intended.

Change-Id: I6146b6299e23f11b35bc1aefd9640541bbbbe953
Reviewed-on: https://chromium-review.googlesource.com/794830Reviewed-by: default avatarBill Orr <billorr@chromium.org>
Reviewed-by: default avatarDavid Dorwin <ddorwin@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519949}
parent 4f551453
...@@ -14,6 +14,7 @@ The OpenVR API supports HTC Vive and other headsets for VR. ...@@ -14,6 +14,7 @@ The OpenVR API supports HTC Vive and other headsets for VR.
Local Modifications: Local Modifications:
Only contains a subset of the git repo necessary to build Chromium. jsoncpp.cpp Only contains a subset of the git repo necessary to build Chromium. jsoncpp.cpp
has been modified to remove exceptions. has been modified to remove exceptions.
json.h has been modified to remove exceptions (delete "throw()").
openvr.h has been modified to remove dllimport/dllexport when building a openvr.h has been modified to remove dllimport/dllexport when building a
non-component build so this can be built as a static library. non-component build so this can be built as a static library.
......
...@@ -425,8 +425,8 @@ namespace Json { ...@@ -425,8 +425,8 @@ namespace Json {
class JSON_API Exception : public std::exception { class JSON_API Exception : public std::exception {
public: public:
Exception(std::string const& msg); Exception(std::string const& msg);
~Exception() throw(); ~Exception();
char const* what() const throw(); char const* what() const;
protected: protected:
std::string msg_; std::string msg_;
}; };
......
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