Fix some clang tidy things
This commit is contained in:
parent
fe03c440fb
commit
fd6e33711b
3 changed files with 8 additions and 8 deletions
|
@ -1,8 +1,8 @@
|
||||||
#include "lcd.hpp"
|
#include "lcd.hpp"
|
||||||
|
|
||||||
lcd_grid lcd(std::string s1,
|
lcd_grid lcd(const std::string & s1,
|
||||||
std::string s2,
|
const std::string & s2,
|
||||||
std::string s3) {
|
const std::string & s3) {
|
||||||
lcd_grid result;
|
lcd_grid result;
|
||||||
result.push_back(s1);
|
result.push_back(s1);
|
||||||
result.push_back(s2);
|
result.push_back(s2);
|
||||||
|
|
|
@ -7,6 +7,6 @@ typedef std::vector<std::string> lcd_grid;
|
||||||
|
|
||||||
lcd_grid lcd(int value);
|
lcd_grid lcd(int value);
|
||||||
|
|
||||||
lcd_grid lcd(std::string s1,
|
lcd_grid lcd(const std::string & s1,
|
||||||
std::string s2,
|
const std::string & s2,
|
||||||
std::string s3);
|
const std::string & s3);
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
#include "lcd.hpp"
|
#include "lcd.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
std::string to_string(lcd_grid grid) {
|
std::string to_string(const lcd_grid & grid) {
|
||||||
std::stringstream output;
|
std::stringstream output;
|
||||||
for (const auto & str: grid)
|
for (const auto & str: grid)
|
||||||
output << str;
|
output << str;
|
||||||
return output.str();
|
return output.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_spec(int value, lcd_grid grid) {
|
void lcd_spec(int value, const lcd_grid & grid) {
|
||||||
std::string expected = to_string(grid),
|
std::string expected = to_string(grid),
|
||||||
actual = to_string(lcd(value));
|
actual = to_string(lcd(value));
|
||||||
if (expected != actual) {
|
if (expected != actual) {
|
||||||
|
|
Loading…
Reference in a new issue