Skip to content

Commit

Permalink
move ADIEncoder copy ctor definition to source file
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Jan 18, 2025
1 parent d37209f commit bd9009a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions include/hardware/Encoder/ADIEncoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class ADIEncoder : public Encoder {
* @endcode
*/
ADIEncoder(SmartPort expanderPort, ADIPair ports, bool reversed);

/**
* @brief ADIEncoder copy constructor
*
Expand All @@ -67,10 +66,7 @@ class ADIEncoder : public Encoder {
*
* @param other the ADIEncoder to copy
*/
ADIEncoder(ADIEncoder& other)
: m_encoder(other.m_encoder),
m_offset(other.m_offset) {}

ADIEncoder(ADIEncoder& other);
/**
* @brief whether the encoder is connected
*
Expand Down
4 changes: 4 additions & 0 deletions src/hardware/Encoder/ADIEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ ADIEncoder::ADIEncoder(ADIPair ports, bool reversed)
ADIEncoder::ADIEncoder(SmartPort expanderPort, ADIPair ports, bool reversed)
: m_encoder({expanderPort, ports.first(), ports.second()}, reversed) {}

ADIEncoder::ADIEncoder(ADIEncoder& other)
: m_encoder(other.m_encoder),
m_offset(other.m_offset) {}

int ADIEncoder::isConnected() {
// it's not possible to check if the ADIEncoder is connected, so we just return 1 to indicate that it is
// we do run a simple test however to check if the ports are valid
Expand Down

0 comments on commit bd9009a

Please sign in to comment.