Repository navigation
OIL 41, chapter Classes - #132
Merged
Merged
Conversation
SimulatorWebHost closed none of its sockets when it was destroyed, so its port stayed taken until the program ended; it has a destructor now, which SimulatorWebHostTest checks, and fails without (C-3). A class that declares a special member declares all six: the moves are deleted where the copies were, and Matrix and Batch delete their default constructor (C-3). The virtual functions of ControlPort give a reason C-6 takes, not a test's; MatrixOf and the control program's windows say why they derive (C-8).
public, protected, private, and in each: types and constants, constructors and destructor, functions, data members. Every class but the few that had it already began with its private members. The text is moved, not changed; data members keep their order among themselves, as they are initialized in it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing changes for a sketch but what it cannot do by mistake: a
Matrixor aBatchcan no longer be moved or made without its arguments, which did not work before either. Whoever runs the simulator's tests or several web hosts in one program finds the port of a host that is gone free again. Every example has the same flash and RAM as on main.The review of the chapter Classes of the coding style in OIL item 41, for the library and the host code, its rules that review checks:
src/Utility/began with its private members. All are in the order the rule asks now: public, protected, private, and in each types and constants, constructors and destructor, functions, data members. The text is moved, not changed, which a count of the lines added and removed confirms, and data members keep their order among themselves, as they are initialized in it. This commit is the bulk of the diff and is best read on its own.MatrixandBatchtheir default constructor.MatrixOfand the control program's windows say why they derive.Nothing to change for C-11, as nothing is
mutable, nor for C-13, as the operators are the bitwise ones ofByteand the comparisons ofStatusandResult.Checked:
make checkpasses: lint, clang-tidy, every host and AVR test, coverage at 100 % of lines, branches and conditions.