helppokersource - Support: sr #2727, const keyword missing in some...

Show feedback again

sr #2727: const keyword missing in some stringToCard functions (fixing patch included)

Submitted by:  Teemu Hirsimäki <tehtehteh>
Submitted on:  Sun Apr 3 07:15:21 2011  
Category: poker-evalPriority: 5 - Normal
Severity: 2 - MinorStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None
Effort: 0.00

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sun Apr 3 07:15:21 2011, original submission:

A few stringToCard functions are missing const keywords for char * arguments even if they do not modify the argument strings. That makes it cumbersome, for example, to feed std::string arguments to the functions in c++. For example, compiling the following c++ program with g++ gives an error "invalid conversion from ‘const char*’ to ‘char*’". The attached patch fixes the problem in poker-eval source.

#include <poker_defs.h>
#include <string>

int main(int argc, char *argv[])
std::string s("Ah");
int card;
StdDeck_stringToCard(s.c_str(), &card)

Teemu Hirsimäki <tehtehteh>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by tehtehteh (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Apr 3 07:15:21 2011tehtehtehAttached File-=>Added poker-eval-136.0-const.patch, #12775
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup