mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 22:03:24 +00:00
Remove version_info::operator=().
It makes cppcheck happy and this one does the same job as one generated by the compiler.
This commit is contained in:
parent
b2e6203185
commit
1193516e96
@ -103,17 +103,6 @@ version_info::version_info(const std::string& str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void version_info::assign(const version_info& o)
|
|
||||||
{
|
|
||||||
if(&o == this) return;
|
|
||||||
|
|
||||||
this->sane_ = o.sane_;
|
|
||||||
this->special_separator_ = o.special_separator_;
|
|
||||||
this->special_ = o.special_;
|
|
||||||
this->nums_.clear();
|
|
||||||
this->nums_ = o.nums_;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string version_info::str() const
|
std::string version_info::str() const
|
||||||
{
|
{
|
||||||
const size_t s = nums_.size();
|
const size_t s = nums_.size();
|
||||||
|
@ -42,12 +42,6 @@ public:
|
|||||||
version_info(unsigned int major, unsigned int minor, unsigned int revision_level, bool sane = true,
|
version_info(unsigned int major, unsigned int minor, unsigned int revision_level, bool sane = true,
|
||||||
char special_separator='\0', const std::string& special=std::string());
|
char special_separator='\0', const std::string& special=std::string());
|
||||||
|
|
||||||
/** Assignment operator. */
|
|
||||||
version_info& operator=(const version_info& o) {
|
|
||||||
this->assign(o);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool good() const { return this->sane_; }
|
bool good() const { return this->sane_; }
|
||||||
bool is_canonical() const;
|
bool is_canonical() const;
|
||||||
|
|
||||||
@ -136,10 +130,6 @@ public:
|
|||||||
/** Syntactic shortcut for str(). */
|
/** Syntactic shortcut for str(). */
|
||||||
operator std::string() const { return this->str(); }
|
operator std::string() const { return this->str(); }
|
||||||
|
|
||||||
protected:
|
|
||||||
/** Assign from other version_info object. */
|
|
||||||
void assign(const version_info&);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<unsigned int> nums_;
|
std::vector<unsigned int> nums_;
|
||||||
std::string special_;
|
std::string special_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user