Skip to content

Commit

Permalink
Use deque instead of vector
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Alfonso committed Dec 4, 2023
1 parent f1548bc commit 9a590ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/CTableauState.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <deque>

#include "CTableau.h"

namespace blacksmith
Expand All @@ -22,7 +24,7 @@ class CTableauState

private:
// Current piece sequence
std::vector<piece_type> mPieceSequence;
std::deque<piece_type> mPieceSequence;
// True if current set is chess, false if it is a number set. Undefined if any.
std::optional<bool> mChessSet;
// Sets completed
Expand Down
1 change: 0 additions & 1 deletion src/CTableauState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ constexpr unsigned short CTableauState::RB_DESTINATIONS_COUNT()
CTableauState::CSetState::CSetState() :
mCount( 0 )
{
mPieceSequence.reserve( CTableau::CHESS_PIECES().size() );
}

unsigned short CTableauState::CSetState::Update( const piece_type& aPiece )
Expand Down

0 comments on commit 9a590ae

Please sign in to comment.