-
Notifications
You must be signed in to change notification settings - Fork 34
chore: remove typos, spelling mistakes & trailing whitespaces #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
|
|
||
| int output_10_function() { | ||
| const int y = ; | ||
| return y; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What has changed? |
||
| return y; | ||
| } | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
|
|
||
| const int y = ; // y is a global variable. Fix it's definition. | ||
| int global_var_10_function() { | ||
| return y; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What has changed? |
||
| return y; | ||
| } | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ void init_words(){ | |
| const std::string secret_key = "Encrypted S3cr3t!"; | ||
|
|
||
| std::string test_danger_loop(uint32_t query_idx) { // Use safe<> type | ||
| // Tip: if you cannot find the problem replace all uint32_t with | ||
| // Tip: if you cannot find the problem replace all uint32_t with | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What has changed? |
||
| // safe<uint32_t>, from the boost::safe_numerics library | ||
| // The safe<uint32_t> will throw an exception to help you find the bug | ||
|
|
||
|
|
@@ -59,7 +59,7 @@ TEST_CASE("integer_signedness") { | |
| std::cout << "Next index to query " << i << ", this is word: " << words[i] << "\n"; | ||
| REQUIRE(test_danger_loop(i) == expected_words.at(i)); | ||
| } | ||
| std::cout << "Next index to query is dangerous :" << 4 << ", this is word:" << words[4] << "\n"; | ||
|
|
||
| std::cout << "Next index to query is dangerous: " << 4 << ", this is word: " << words[4] << "\n"; | ||
| REQUIRE(test_danger_loop(len + 1) == ""); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| // even after you already figured it out. | ||
|
|
||
|
|
||
| void callme(int x) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the difference? |
||
| void callme(int x) { | ||
| for (int i = 0; i < x; i++) { | ||
| std::cout << "Ring! Call number " << i + 1 << "\n"; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,9 @@ constexpr void is_even(int num) { | |
| auto sale_price = []() -> int { | ||
| if (is_even(price)) | ||
| return price - 10; | ||
| else | ||
| else | ||
| return price - 3; | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the change? |
||
| }; | ||
|
|
||
| int function_syntax() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| // Make me compile! Go to the folder hint if you want a hint :) | ||
|
|
||
| // We sometimes encourage you to keep trying things on a given exercise, | ||
| // even after you already figured it out. | ||
| // even after you already figured it out. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the change? |
||
|
|
||
| // Step 1: Make me compile and pass! | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ struct Point { | |
| } | ||
| }; | ||
|
|
||
| constexpr Point point_zero = ; | ||
| constexpr Point point_zero = ; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the change? |
||
|
|
||
| class Shape { | ||
| public: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ class Shape { | |
|
|
||
| class Circle : public Shape { | ||
| public: | ||
| Circle(const Point& centre = point_zero) : Shape(centre) { } | ||
| Circle(const Point& centre = point_zero) : Shape(centre) { } | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the change? |
||
| virtual Point center() const { | ||
| return Circle::center_; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # Standard Containers | ||
| Here, you'll learn how to write a to reconize when standard containers may be useful. | ||
| Here, you'll learn how to recognize when standard containers may be useful. | ||
|
|
||
|
|
||
| ## Book Sections | ||
| Introduction to # Standard Containers - | ||
| (Introduction to Vectors)[https://www.cplusplus.com/reference/vector/] | ||
| (Introduction to Unordered Sets)[https://www.cplusplus.com/reference/unordered_set/unordered_set/] and (Sets)[https://www.cplusplus.com/reference/set/set/] ) | ||
| (Introduction to Unordered Map)[https://www.cplusplus.com/reference/unordered_map/unordered_map/] and (Map)[https://www.cplusplus.com/reference/map/map/] ) | ||
| Introduction to Standard Containers - | ||
| [Introduction to Vectors](https://www.cplusplus.com/reference/vector/) | ||
| [Introduction to Unordered Sets](https://www.cplusplus.com/reference/unordered_set/unordered_set/) and [Sets](https://www.cplusplus.com/reference/set/set/) | ||
| [Introduction to Unordered Map](https://www.cplusplus.com/reference/unordered_map/unordered_map/) and [Map](https://www.cplusplus.com/reference/map/map/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the change here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can see, there is this red bar at the end which displays a trailing space... Same for the others.