Skip to content

Commit

Permalink
fix warnings on clang
Browse files Browse the repository at this point in the history
  • Loading branch information
ManDeJan committed Sep 20, 2022
1 parent d733d8a commit c6597eb
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions library/graphics/hwlib-graphics-canvas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class canvas_color : public window, private image {

color buffer[ size_x ][ size_y ];

void write_implementation( xy pos, color col ) override {
void write_implementation( xy pos, color col ) {
buffer[ pos.x ][ pos.y ] = col;
}

color get_implementation( xy pos ) const override {
color get_implementation( xy pos ) const {
return buffer[ pos.x ][ pos.y ];
}

Expand Down
2 changes: 1 addition & 1 deletion library/graphics/hwlib-graphics-font-8x8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class font_default_8x8 : public font {

public:

constexpr const image & operator[]( char c ) const override {
virtual const image & operator[]( char c ) const override {
return images[ c & 0x7F ];
}
};
Expand Down
2 changes: 1 addition & 1 deletion library/peripherals/hwlib-glcd-5510.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace hwlib {
class glcd_5510 : public window {
private:
pin_out & sce;
pin_out & res;
[[maybe_unused]] pin_out & res;
pin_out & dc;
pin_out & sdin;
pin_out & sclk;
Expand Down
2 changes: 1 addition & 1 deletion library/peripherals/hwlib-glcd-st7789.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class st7789_spi_dc_cs_rst : public st7789, public window {
spi_bus & bus;
pin_out & dc;
pin_out & cs;
pin_out & rst;
[[maybe_unused]] pin_out & rst;

public:

Expand Down
2 changes: 1 addition & 1 deletion library/peripherals/hwlib-pcf8591.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class pcf8591 {
return chip.get( adc_channel );
}

void refresh(){
void refresh() override {
}
};

Expand Down
4 changes: 2 additions & 2 deletions library/pins/hwlib-pin-from-pin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class pin_in_out_from_oc_t : public pin_in_out {
slave.write( 1 );
}

void direction_set_output(){
void direction_set_output() override {
is_output = true;
// nothing more to do
}
Expand Down Expand Up @@ -270,7 +270,7 @@ class pin_in_out_from_in_out_t : public pin_in_out {
slave.direction_set_input();
}

void direction_set_output(){
void direction_set_output() override {
slave.direction_set_output();
}

Expand Down
12 changes: 6 additions & 6 deletions library/pins/hwlib-pin-invert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class pin_invert_from_out_t : public pin_out {
/// construct from a pin_out
pin_invert_from_out_t( pin_out & slave ): slave( slave ){}

void write( bool x ){
void write( bool x ) override {
slave.write( !x );
}

Expand Down Expand Up @@ -69,7 +69,7 @@ class pin_invert_from_in_t : public pin_in {
/// construct from a pin_in
pin_invert_from_in_t( pin_in & slave ): slave( slave ){}

bool read(){
bool read() override {
return ! slave.read();
}

Expand Down Expand Up @@ -100,11 +100,11 @@ class pin_invert_from_in_out_t : public pin_in_out {
/// construct from a pin_in_out
pin_invert_from_in_out_t( pin_in_out & slave ): slave( slave ){}

bool read(){
bool read() override {
return ! slave.read();
}

void write( bool x ){
void write( bool x ) override {
slave.write( !x );
}

Expand Down Expand Up @@ -151,11 +151,11 @@ class pin_invert_from_oc_t : public pin_oc {
/// construct from a pin_oc
pin_invert_from_oc_t( pin_oc & slave ): slave( slave ){}

bool read(){
bool read() override {
return ! slave.read();
}

void write( bool x ){
void write( bool x ) override {
slave.write( !x );
}

Expand Down
8 changes: 4 additions & 4 deletions library/ports/hwlib-port-direct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class port_direct_from_in_out_t : public port_in_out {
/// construct from a port_in_out
port_direct_from_in_out_t( port_in_out & slave ): slave( slave ){}

uint_fast8_t number_of_pins(){
uint_fast8_t number_of_pins() override {
return slave.number_of_pins();
}

Expand Down Expand Up @@ -102,7 +102,7 @@ class port_direct_from_in_t : public port_in {
/// construct from a port_in
port_direct_from_in_t( port_in & slave ): slave( slave ){}

uint_fast8_t number_of_pins(){
uint_fast8_t number_of_pins() override {
return slave.number_of_pins();
}

Expand Down Expand Up @@ -141,7 +141,7 @@ class port_direct_from_out_t : public port_out {
/// construct from a port_out
port_direct_from_out_t( port_out & slave ): slave( slave ){}

uint_fast8_t number_of_pins(){
uint_fast8_t number_of_pins() override {
return slave.number_of_pins();
}

Expand Down Expand Up @@ -180,7 +180,7 @@ class port_direct_from_oc_t : public port_oc {
/// construct from a port_oc
port_direct_from_oc_t( port_oc & slave ): slave( slave ){}

uint_fast8_t number_of_pins(){
uint_fast8_t number_of_pins() override {
return slave.number_of_pins();
}

Expand Down
4 changes: 2 additions & 2 deletions library/ports/hwlib-port-from-port.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class port_in_out_from_oc_t : public port_in_out {
slave.write( 0xFF );
}

void direction_set_output(){
void direction_set_output() override {
is_output = true;
// nothing more to do
}
Expand Down Expand Up @@ -302,7 +302,7 @@ class port_in_out_from_in_out_t : public port_in_out {
slave.direction_set_input();
}

void direction_set_output(){
void direction_set_output() override {
slave.direction_set_output();
}

Expand Down

0 comments on commit c6597eb

Please sign in to comment.