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 03 Apr 2011 07:15:21 AM UTC  
 
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 03 Apr 2011 07:15:21 AM UTC, 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):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

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

    Back to the top


    Powered by Savane 3.1-cleanup