D24420: Compile error on conversion of std::time_t to long int

Thomas Branch <[email protected]>
Newsgroups gmane.comp.kde.devel.games
Message-ID <[email protected]>
twighk created this revision.
twighk added a reviewer: KDE Games.
twighk added projects: KDE Games, Craft.
Herald added a subscriber: kde-games-devel.
twighk requested review of this revision.

REVISION SUMMARY
  Compile error with craft on windows using mingw compiler
  
  C:/CraftRoot/build/_/7971cb53/kgoldrunner-19.08.1/src/kgrgame.cpp:118:56: error: call of overloaded 'KRandomSequence(time_t)' is ambiguous
  
    randomGen = new KRandomSequence (std::time(nullptr));
                                                       ^
  
  In file included from C:/CraftRoot/include/KF5/KCoreAddons/KRandomSequence:1,
  
    from C:/CraftRoot/build/_/7971cb53/kgoldrunner-19.08.1/src/kgrgame.cpp:59:
  
  C:/CraftRoot/include/KF5/KCoreAddons/krandomsequence.h:70:5: note: candidate: 'KRandomSequence::KRandomSequence(const KRandomSequence&)'
  
    KRandomSequence(const KRandomSequence &a);
    ^~~~~~~~~~~~~~~
  
  C:/CraftRoot/include/KF5/KCoreAddons/krandomsequence.h:60:14: note: candidate: 'KRandomSequence::KRandomSequence(long int)'
  
    explicit KRandomSequence(long lngSeed);
             ^~~~~~~~~~~~~~~
  
  C:/CraftRoot/include/KF5/KCoreAddons/krandomsequence.h:59:14: note: candidate: 'KRandomSequence::KRandomSequence(int)'
  
    explicit KRandomSequence(int intSeed = 0);
             ^~~~~~~~~~~~~~~

REPOSITORY
  R396 KGoldrunner

REVISION DETAIL
  https://phabricator.kde.org/D24420

AFFECTED FILES
  kgoldrunner-19.08.1/src/kgrgame.cpp

To: twighk, #kde_games
Cc: kde-games-devel, krippendorf, hoetzel, hechenlan, bencreasy, vonreth
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.