Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 10874009: Use a proper enum type for procedures that can be called (Closed)

Created:
June 3, 2013, 1:53 p.m. by Wladimir Palant
Modified:
June 19, 2013, 5:38 p.m.
Reviewers:
Felix Dahlke, Oleksandr
Visibility:
Public.

Description

Use a proper enum type for procedures that can be called

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -74 lines) Patch
M src/engine/main.cpp View 1 chunk +74 lines, -63 lines 0 comments Download
M src/plugin/AdblockPlusClient.cpp View 3 chunks +9 lines, -9 lines 0 comments Download
M src/shared/Communication.h View 2 chunks +15 lines, -2 lines 3 comments Download

Messages

Total messages: 4
Wladimir Palant
June 3, 2013, 1:53 p.m. (2013-06-03 13:53:22 UTC) #1
Felix Dahlke
http://codereview.adblockplus.org/10874009/diff/1/src/shared/Communication.h File src/shared/Communication.h (right): http://codereview.adblockplus.org/10874009/diff/1/src/shared/Communication.h#newcode17 src/shared/Communication.h:17: enum ProcType : uint32_t { I can't find anything ...
June 4, 2013, 6:47 a.m. (2013-06-04 06:47:32 UTC) #2
Wladimir Palant
http://codereview.adblockplus.org/10874009/diff/1/src/shared/Communication.h File src/shared/Communication.h (right): http://codereview.adblockplus.org/10874009/diff/1/src/shared/Communication.h#newcode17 src/shared/Communication.h:17: enum ProcType : uint32_t { It is a standard ...
June 4, 2013, 9:26 a.m. (2013-06-04 09:26:13 UTC) #3
Felix Dahlke
June 4, 2013, 11:55 a.m. (2013-06-04 11:55:21 UTC) #4
LGTM

http://codereview.adblockplus.org/10874009/diff/1/src/shared/Communication.h
File src/shared/Communication.h (right):

http://codereview.adblockplus.org/10874009/diff/1/src/shared/Communication.h#...
src/shared/Communication.h:17: enum ProcType : uint32_t {
On 2013/06/04 09:26:13, Wladimir Palant wrote:
> It is a standard feature, see
> http://en.wikipedia.org/wiki/C%252B%252B11#Strongly_typed_enumerations.
> Unfortunately, the MSVC implementation is non-standard - typing is implemented
> for regular enums, not enum classes (which are unsupported).

Didn't know it's a new standard feature, in this case it's the best solution :)

As long as we have something equivalent in other compilers, we can always have
some conditional code if all else fails.

Powered by Google App Engine
This is Rietveld