Skip to content

Commit

Permalink
fix typos and blanks
Browse files Browse the repository at this point in the history
  • Loading branch information
daixtrose committed Oct 17, 2024
1 parent 0386212 commit db2bb31
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion polymorphism/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ As an alternative, the *definition* of `consume` could be in the header `include

## Testing

In this example, I use [µt](https://github.com/boost-ext/ut) as testing framework for no good reason. It looks promising and lightweight, and it was written by [Krzysztof Jusiak](https://github.com/krzysztof-jusiak) whom I adore for his outstanding C++ programming skills and his [C++ Tip of The Week](https://github.com/tip-of-the-week/cpp) collection of crazy C++ riddles.
In this example, I use [µt](https://github.com/boost-ext/ut) as testing framework for no good reason. It looks promising and lightweight, and it was written by [Krzysztof Jusiak](https://github.com/krzysztof-jusiak) whom I adore for his outstanding C++ programming skills and his [C++ Tip of The Week](https://github.com/tip-of-the-week/cpp) collection of crazy C++ riddles.

The one-header version of it is pulled into the project via the CMake call

Expand Down
6 changes: 3 additions & 3 deletions polymorphism/include/polymorphism/impl_with_interface.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef POYMORPHISM_IMPL_WITH_INTERFACE_HPP
#define POYMORPHISM_IMPL_WITH_INTERFACE_HPP
#ifndef POLYMORPHISM_IMPL_WITH_INTERFACE_HPP
#define POLYMORPHISM_IMPL_WITH_INTERFACE_HPP

// make the inteface defintion visible
#include <polymorphism/i_super_cool_features.hpp>
Expand All @@ -23,4 +23,4 @@ class Impl

} // namespace classic

#endif // POYMORPHISM_IMPL_WITH_INTERFACE_HPP
#endif // POLYMORPHISM_IMPL_WITH_INTERFACE_HPP
8 changes: 4 additions & 4 deletions polymorphism/include/polymorphism/impl_without_interface.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef POYMORPHISM_IMPL_WITHOUT_INTERFACE_HPP
#define POYMORPHISM_IMPL_WITHOUT_INTERFACE_HPP
#ifndef POLYMORPHISM_IMPL_WITHOUT_INTERFACE_HPP
#define POLYMORPHISM_IMPL_WITHOUT_INTERFACE_HPP

#include <polymorphism/has_super_cool_features.hpp>

Expand All @@ -12,7 +12,7 @@ class Impl {
std::string s_ { "<default value>" }; // with default member initializer (C++11)

public:
std::string coolFeature() const noexcept { return s_; }
[[nodiscard]] std::string coolFeature() const noexcept { return s_; }
void set(std::string s) noexcept
{
s_ = std::move(s);
Expand All @@ -25,4 +25,4 @@ static_assert(has_super_cool_features<Impl>,

} // namespace modern

#endif // POYMORPHISM_IMPL_WITHOUT_INTERFACE_HPP
#endif // POLYMORPHISM_IMPL_WITHOUT_INTERFACE_HPP

0 comments on commit db2bb31

Please sign in to comment.