Skip to content

Commit

Permalink
Merge bitcoin#13180: Fix re-declared scoped enum as unscoped (Causes …
Browse files Browse the repository at this point in the history
…issues with some compilers)

43f3dec Remove enum specifier (to avoid re-declare scoped enum as unscoped) (donaloconnor)

Pull request description:

  MSVC fails to compile with the changes made in bitcoin#10742

  The problem is enum types were changed to scoped (`enum class`) but in some places `enum` as an unscoped is used.

  This is a very simple fix and I've tested it.

  Edit: Had to remove enum altogether - `enum class` doesn't compile on clang.

Tree-SHA512: 13e21666243585a133c74c81249a1fa4098d6b7aa3cda06be871fa017c0ad9bb7b0725f801160b9d31678448d668718197941fd84702ebdef15128c27d92cd70
  • Loading branch information
jonasschnelli authored and PastaPastaPasta committed Jun 11, 2020
1 parent b889c55 commit 65d16ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ enum class RetFormat {
};

static const struct {
enum RetFormat rf;
RetFormat rf;
const char* name;
} rf_names[] = {
{RetFormat::UNDEF, ""},
Expand Down Expand Up @@ -67,7 +67,7 @@ static bool RESTERR(HTTPRequest* req, enum HTTPStatusCode status, std::string me
return false;
}

static enum RetFormat ParseDataFormat(std::string& param, const std::string& strReq)
static RetFormat ParseDataFormat(std::string& param, const std::string& strReq)
{
const std::string::size_type pos = strReq.rfind('.');
if (pos == std::string::npos)
Expand Down

0 comments on commit 65d16ff

Please sign in to comment.