Fix SimpleGuesser::operator=' should return 'SimpleGuesser &
Change-Id: I29205bc8db7569cf123a52dd248a9165ebaef3a3
This commit is contained in:
@@ -95,9 +95,14 @@ SimpleGuesser::SimpleGuesser()
|
||||
h = NULL;
|
||||
}
|
||||
|
||||
void SimpleGuesser::operator=(SimpleGuesser& sg){
|
||||
SimpleGuesser& SimpleGuesser::operator=(const SimpleGuesser& sg){
|
||||
// Check for self-assignment!
|
||||
if (this == &sg) // Same object?
|
||||
return *this; // Yes, so skip assignment, and just return *this.
|
||||
|
||||
if(h){textcat_Done(h);}
|
||||
h = sg.h;
|
||||
return *this;
|
||||
}
|
||||
|
||||
SimpleGuesser::~SimpleGuesser()
|
||||
|
||||
@@ -37,10 +37,10 @@ public:
|
||||
/**inits the object with conf file "./conf.txt"*/
|
||||
SimpleGuesser();
|
||||
|
||||
/** Compares the current Simpleguesser with an other
|
||||
* @param SimpleGuesser& sg the other guesser to compare
|
||||
/**
|
||||
* @param SimpleGuesser& sg the other guesser
|
||||
*/
|
||||
void operator=(SimpleGuesser& sg);
|
||||
SimpleGuesser& operator=(const SimpleGuesser& sg);
|
||||
|
||||
/**
|
||||
* destroy the object
|
||||
|
||||
Reference in New Issue
Block a user