Petits tweaks
This commit is contained in:
parent
69461a3f6f
commit
a4764cd225
@ -326,7 +326,6 @@ void GOLTeamH::randomize(double percentAlive)
|
||||
//! \return true si le patron est valide, false sinon.
|
||||
//!
|
||||
|
||||
// TODO
|
||||
bool GOLTeamH::setFromPattern(std::string const& pattern, int centerX, int centerY)
|
||||
{
|
||||
auto sq = parsePattern(pattern);
|
||||
@ -556,6 +555,8 @@ std::optional<GOLTeamH::sizeQueried> GOLTeamH::parsePattern(std::string const& p
|
||||
{
|
||||
// Analyse du pattern
|
||||
size_t pos{}, processedNumbers{};
|
||||
if (pattern.size() < 6)
|
||||
return std::nullopt;
|
||||
|
||||
// Vérification du '[' initial
|
||||
if (pattern[pos++] != '[') {
|
||||
|
@ -59,11 +59,11 @@ GridTeamH& GridTeamH::operator=(GridTeamH&& mv) noexcept
|
||||
if (this != &mv) {
|
||||
dealloc();
|
||||
|
||||
mAliveCount = std::move(mv.mAliveCount);
|
||||
mWidth = std::move(mv.mWidth);
|
||||
mHeight = std::move(mv.mHeight);
|
||||
mData = std::move(mv.mData);
|
||||
mIntermediateData = std::move(mv.mIntermediateData);
|
||||
mAliveCount = mv.mAliveCount;
|
||||
mWidth = mv.mWidth;
|
||||
mHeight = mv.mHeight;
|
||||
mData = mv.mData;
|
||||
mIntermediateData = mv.mIntermediateData;
|
||||
|
||||
// Il faut que le destructeur de l'ancien objet soit valide.
|
||||
mv.mData = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user