Skip to content
  • pkasting@chromium.org's avatar
    Convert SHA256_LENGTH from a constant-in-anonymous-enum to a static const. ... · ea73fc7b
    pkasting@chromium.org authored
    Convert SHA256_LENGTH from a constant-in-anonymous-enum to a static const.  This defines the constant where it's declared to preserve the existing readability.
    
    Normally this makes things like DCHECK_EQ() unhappy, but when I'd originally tested this I didn't seem to need to make any changes due to that.  Will be watching the trybots...
    
    The original motiviation for this change was to find a way to eliminate some cases of passing anonymous-typed values as template arguments (which happens when you use a value from the enum in e.g. EXPECT_EQ()), which is technically illegal in C++03, though we don't warn about it. Simply naming the enum would have done this, but in general naming enums used to declare constants like this is bizarre ("enum Constants { ... }"?).
    
    BUG=92247
    TEST=Compiles
    Review URL: http://codereview.chromium.org/7823004
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102369 0039d316-1c4b-4281-b951-d872f2087c98
    ea73fc7b