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

Thomas Branch noreply at phabricator.kde.org
Sat Oct 5 10:13:20 BST 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20191005/8fd594c1/attachment.html>


More information about the kde-games-devel mailing list