mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
[DeckList] refactor: pass DeckList by const ref (#6437)
* [DeckList] refactor: pass DeckList by const ref * Change getDeckList to return a const ref
This commit is contained in:
parent
73a90bdf38
commit
a0f977e80c
12 changed files with 70 additions and 75 deletions
|
|
@ -59,11 +59,11 @@ public:
|
|||
bool saveToFile(const QString &fileName, DeckFileFormat::Format fmt);
|
||||
bool updateLastLoadedTimestamp(const QString &fileName, DeckFileFormat::Format fmt);
|
||||
|
||||
static QString exportDeckToDecklist(const DeckList *deckList, DecklistWebsite website);
|
||||
static QString exportDeckToDecklist(const DeckList &deckList, DecklistWebsite website);
|
||||
|
||||
static void saveToClipboard(const DeckList *deckList, bool addComments = true, bool addSetNameAndNumber = true);
|
||||
static void saveToClipboard(const DeckList &deckList, bool addComments = true, bool addSetNameAndNumber = true);
|
||||
static bool saveToStream_Plain(QTextStream &out,
|
||||
const DeckList *deckList,
|
||||
const DeckList &deckList,
|
||||
bool addComments = true,
|
||||
bool addSetNameAndNumber = true);
|
||||
|
||||
|
|
@ -72,9 +72,9 @@ public:
|
|||
* @param printer The printer to render the decklist to.
|
||||
* @param deckList
|
||||
*/
|
||||
static void printDeckList(QPrinter *printer, const DeckList *deckList);
|
||||
static void printDeckList(QPrinter *printer, const DeckList &deckList);
|
||||
|
||||
bool convertToCockatriceFormat(QString fileName);
|
||||
bool convertToCockatriceFormat(const QString &fileName);
|
||||
|
||||
LoadedDeck &getDeck()
|
||||
{
|
||||
|
|
@ -91,7 +91,7 @@ public:
|
|||
|
||||
private:
|
||||
static void printDeckListNode(QTextCursor *cursor, const InnerDecklistNode *node);
|
||||
static void saveToStream_DeckHeader(QTextStream &out, const DeckList *deckList);
|
||||
static void saveToStream_DeckHeader(QTextStream &out, const DeckList &deckList);
|
||||
|
||||
static void saveToStream_DeckZone(QTextStream &out,
|
||||
const InnerDecklistNode *zoneNode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue