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