Skip to content

Commit 7b55201

Browse files
committed
address comments
1 parent 40f076f commit 7b55201

38 files changed

Lines changed: 42 additions & 143 deletions

File tree

concepts/headers/about.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ One possible layout is to keep all the implementation details in the source file
4949

5050
```cpp
5151
// A file named robot_flower.h
52-
#pragma once
52+
#if !defined(ROBOT_FLOWER_H)
53+
#define ROBOT_FLOWER_H
5354
#include <string>
5455
namespace robots {
5556
class Flower {

concepts/headers/introduction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ One possible layout is to keep all the implementation details in the source file
4949

5050
```cpp
5151
// A file named robot_flower.h
52-
#pragma once
52+
#if !defined(ROBOT_FLOWER_H)
53+
#define ROBOT_FLOWER_H
5354
#include <string>
5455
namespace robots {
5556
class Flower {

exercises/concept/doctor-data/.docs/introduction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ One possible layout is to keep all the implementation details in the source file
4949

5050
```cpp
5151
// A file named robot_flower.h
52-
#pragma once
52+
#if !defined(ROBOT_FLOWER_H)
53+
#define ROBOT_FLOWER_H
5354
#include <string>
5455
namespace robots {
5556
class Flower {

exercises/practice/binary-search/.approaches/introduction.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ One approach can use a `while` loop with `if` statements.
77

88
**binary_search.h**
99
```cpp
10-
#if !defined(BINARY_SEARCH_H)
11-
#define BINARY_SEARCH_H
10+
#pragma once
1211
#include <vector>
1312
#include <cstddef>
1413
namespace binary_search {
1514
std::size_t find (const std::vector<int>& data, int value);
1615
} // namespace binary_search
17-
#endif // BINARY_SEARCH_H
1816
```
1917
2018
**binary_search.cpp**

exercises/practice/binary-search/.approaches/while-with-if-statements/content.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33

44
**binary_search.h**
55
```cpp
6-
#if !defined(BINARY_SEARCH_H)
7-
#define BINARY_SEARCH_H
6+
#pragma once
87
#include <vector>
98
#include <cstddef>
109
namespace binary_search {
1110
std::size_t find (const std::vector<int>& data, int value);
1211
} // namespace binary_search
13-
#endif // BINARY_SEARCH_H
1412
```
1513
1614
**binary_search.cpp**

exercises/practice/pangram/.approaches/algorithm-allof/content.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22

33
**pangram.h**
44
```cpp
5-
#if !defined(PANGRAM_H)
6-
#define PANGRAM_H
5+
#pragma once
76
#include <string_view>
87

98
namespace pangram {
109
bool is_pangram(std::string_view phrase);
1110
} // namespace pangram
12-
13-
#endif // PANGRAM_H
1411
```
1512
1613
**pangram.cpp**

exercises/practice/pangram/.approaches/bitset-all/content.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33

44
**pangram.h**
55
```cpp
6-
#if !defined(PANGRAM_H)
7-
#define PANGRAM_H
6+
#pragma once
87
#include <string_view>
98

109
namespace pangram {
1110
bool is_pangram(std::string_view phrase);
1211
} // namespace pangram
13-
14-
#endif // PANGRAM_H
1512
```
1613
1714
**pangram.cpp**

exercises/practice/pangram/.approaches/introduction.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ Another approach can use the [`algorithm.all_of()`][all_of] function.
99

1010
**pangram.h**
1111
```cpp
12-
#if !defined(PANGRAM_H)
13-
#define PANGRAM_H
12+
#pragma once
1413
#include <string_view>
1514

1615
namespace pangram {
1716
bool is_pangram(std::string_view phrase);
1817
} // namespace pangram
19-
20-
#endif // PANGRAM_H
2118
```
2219
2320
**pangram.cpp**

exercises/practice/reverse-string/.approaches/direct-construction/content.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22

33
**reverse_string.h**
44
```cpp
5-
#ifndef REVERSE_STRING_H
6-
#define REVERSE_STRING_H
5+
#pragma once
76

87
#include <string>
98

109
namespace reverse_string
1110
{
1211
std::string reverse_string(std::string_view str);
1312
}
14-
15-
#endif // REVERSE_STRING_H
1613
```
1714

1815
**reverse_string.cpp**

exercises/practice/reverse-string/.approaches/divide-and-conquer/content.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22

33
**reverse_string.h**
44
```cpp
5-
#ifndef REVERSE_STRING_H
6-
#define REVERSE_STRING_H
5+
#pragma once
76

87
#include <string>
98

109
namespace reverse_string
1110
{
1211
std::string reverse_string(std::string_view str);
1312
}
14-
15-
#endif // REVERSE_STRING_H
1613
```
1714

1815
**reverse_string.cpp**

0 commit comments

Comments
 (0)