1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 11158

Show
Ignore:
Timestamp:
04/25/12 22:29:23 (13 months ago)
Author:
undef-in-ed
Message:

simplify PlayerProfile::generateUniqueId: modulo operation can be saved because of bitmask

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/src/config/player.cpp

    r11157 r11158  
    7878{ 
    7979    return ((int64_t)(Time::getTimeSinceEpoch()) << 32) | 
    80            (((rand()%65536) << 16) & 0xFFFF0000) | 
     80           ((rand() << 16) & 0xFFFF0000) | 
    8181           (StringUtils::simpleHash(playerName) & 0xFFFF); 
    8282}