From 3a1a1e1b82b7a9e280ee040d1aad27d356983876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 16 May 2012 01:06:26 +0200 Subject: [PATCH] Style cleanup. --- src/apps/sudoku/SudokuField.h | 72 +++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/src/apps/sudoku/SudokuField.h b/src/apps/sudoku/SudokuField.h index bd270e30bb..f16b3f6488 100644 --- a/src/apps/sudoku/SudokuField.h +++ b/src/apps/sudoku/SudokuField.h @@ -1,5 +1,5 @@ /* - * Copyright 2007-2010, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2007-2012, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ #ifndef SUDOKU_FIELD_H @@ -17,39 +17,42 @@ enum { class SudokuField : public BArchivable { public: - SudokuField(uint32 size); - SudokuField(const BMessage* archive); - SudokuField(const SudokuField& other); - virtual ~SudokuField(); + SudokuField(uint32 size); + SudokuField(const BMessage* archive); + SudokuField(const SudokuField& other); + virtual ~SudokuField(); - status_t InitCheck(); + status_t InitCheck(); - virtual status_t Archive(BMessage* archive, bool deep) const; - static SudokuField* Instantiate(BMessage* archive); + virtual status_t Archive(BMessage* archive, bool deep) const; + static SudokuField* Instantiate(BMessage* archive); - status_t SetTo(char base, const char* data); - void SetTo(const SudokuField* other); - void Reset(); + status_t SetTo(char base, const char* data); + void SetTo(const SudokuField* other); + void Reset(); - bool IsSolved() const; - bool IsEmpty() const; + bool IsSolved() const; + bool IsEmpty() const; - uint32 Size() const { return fSize; } - uint32 BlockSize() const { return fBlockSize; } + uint32 Size() const { return fSize; } + uint32 BlockSize() const { return fBlockSize; } - void SetHintMaskAt(uint32 x, uint32 y, uint32 hintMask); - uint32 HintMaskAt(uint32 x, uint32 y) const; + void SetHintMaskAt(uint32 x, uint32 y, + uint32 hintMask); + uint32 HintMaskAt(uint32 x, uint32 y) const; - void SetValidMaskAt(uint32 x, uint32 y, uint32 validMask); - uint32 ValidMaskAt(uint32 x, uint32 y) const; + void SetValidMaskAt(uint32 x, uint32 y, + uint32 validMask); + uint32 ValidMaskAt(uint32 x, uint32 y) const; - void SetFlagsAt(uint32 x, uint32 y, uint32 flags); - uint32 FlagsAt(uint32 x, uint32 y) const; + void SetFlagsAt(uint32 x, uint32 y, uint32 flags); + uint32 FlagsAt(uint32 x, uint32 y) const; - void SetValueAt(uint32 x, uint32 y, uint32 value, bool setSolved = false); - uint32 ValueAt(uint32 x, uint32 y) const; + void SetValueAt(uint32 x, uint32 y, uint32 value, + bool setSolved = false); + uint32 ValueAt(uint32 x, uint32 y) const; - void Dump(); + void Dump(); private: struct field { @@ -61,16 +64,19 @@ private: uint32 value; }; - bool _ValidValueAt(uint32 x, uint32 y) const; - void _ComputeValidMask(uint32 x, uint32 y, bool setSolved); - void _UpdateValidMaskChanged(uint32 x, uint32 y, bool setSolved); - const field& _FieldAt(uint32 x, uint32 y) const; - field& _FieldAt(uint32 x, uint32 y); + bool _ValidValueAt(uint32 x, uint32 y) const; + void _ComputeValidMask(uint32 x, uint32 y, + bool setSolved); + void _UpdateValidMaskChanged(uint32 x, uint32 y, + bool setSolved); + const field& _FieldAt(uint32 x, uint32 y) const; + field& _FieldAt(uint32 x, uint32 y); - uint32 fSize; - uint32 fBlockSize; - uint32 fMaxMask; - field* fFields; +private: + uint32 fSize; + uint32 fBlockSize; + uint32 fMaxMask; + field* fFields; };