Skip to content

Commit 3c4878c

Browse files
authored
remove same line multiple instruction in robot_flower.cpp example
1 parent 55af5ec commit 3c4878c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

concepts/headers/introduction.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ namespace robots {
7373
// A file named robot_flower.cpp
7474
#include "robot_flower.h"
7575
robots::Flower::Flower(std::string name, int size) {
76-
this->name = "Robotica " + name; this->size = size;
76+
this->name = "Robotica " + name;
77+
this->size = size;
7778
}
7879
void robots::Flower::start_next_day() {
79-
if (!needs_water) ++size; needs_water = true;
80+
if (!needs_water) ++size;
81+
needs_water = true;
8082
}
8183
std::string robots::Flower::get_name() {
8284
return name;

0 commit comments

Comments
 (0)