Hi Everyone,

The library used to have the following macro:

  #if (_MSC_VER == 1300) || defined(__INTEL_COMPILER) || 
defined(__BORLANDC__)
  # define CRYPTOPP_CONSTANT(x) enum {x};
  #else
  # define CRYPTOPP_CONSTANT(x) static const int x;
  #endif

There's a few key differences between 'enum' and 'static const'. One of 
them is an enum takes no space in a class object, while static int's have 
space allocated for them. Enums result in smaller objects at runtime.

I tested some code that uses enums rather than ints, and the code was 
measurable faster:

  # define CRYPTOPP_CONSTANT(x) enum {x};

The change was checked in at 
https://github.com/weidai11/cryptopp/commit/953252e44d25ce82.

If you are working from Master then please rebuild the library.

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to