Skip to content

Commit

Permalink
Added copy & move assigments
Browse files Browse the repository at this point in the history
  • Loading branch information
valmat committed Mar 6, 2016
1 parent 6172432 commit 231c574
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Pino.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ class Pino
// Constructor
Pino(uint8_t pinNom) : _pin(pinNom) {}

// Copy constructor
// Copy & Move constructors
Pino( const Pino& ) = default;

// Move constructor
Pino ( Pino && ) = default;
Pino( Pino && ) = default;

// Copy & Move assigments
Pino& operator=(const Pino &) = default;
Pino& operator=(Pino &&) = default;

// initialize a pin as mode.
void mode(Mode mode) const
Expand Down Expand Up @@ -170,5 +172,5 @@ class Pino
}

private:
const uint8_t _pin;
uint8_t _pin;
};

0 comments on commit 231c574

Please sign in to comment.