Skip to content

Commit

Permalink
Fix broken pattern links
Browse files Browse the repository at this point in the history
  • Loading branch information
sftrabbit committed Aug 27, 2018
1 parent 290f0ab commit a222c84
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion common-tasks/algorithms/swap-containers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main()
//
// On [14], we use `std::vector`'s `swap` member function to swap the
// contents all in one shot. Alternatively, [16-17] perform the same
// operation with the [generic swap pattern](/common-tasks/swap-values.html).
// operation with the [generic swap pattern](/patterns/swap-values.html).
// This approach is much faster than `std::swap_ranges`, as it simply
// swaps over the internal storage in constant time. It also does not
// require the containers to have the same size. However, after the
Expand Down
4 changes: 2 additions & 2 deletions common-tasks/classes/rule-of-five.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ class foo
// **Note**: The copy and move assignment operators in the example code
// provide only basic exception safety. They may alternatively be
// implemented with [the copy-and-swap
// idiom](/common-tasks/copy-and-swap.html), which provides strong
// idiom](/patterns/copy-and-swap.html), which provides strong
// exception safety at an optimisation cost.
//
// **Note**: We can typically avoid manual memory management and
// having to write the copy constructor, assignment operator, and
// destructor entirely by using the
// [rule of zero](/common-tasks/rule-of-zero.html)
// [rule of zero](/patterns/rule-of-zero.html)

int main()
{
Expand Down
2 changes: 1 addition & 1 deletion common-tasks/input-streams/validate-multiple-reads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ int main()
// successful.
//
// If you are reading values on multiple lines, consider [reading
// from the stream line-by-line](/common-tasks/read-line-by-line.html)
// from the stream line-by-line](/patterns/read-line-by-line.html)
// and then parsing each line.
2 changes: 1 addition & 1 deletion common-tasks/memory-management/shared-ownership.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ int main()
// destroyed.
//
// In other cases, you may instead wish to [transfer unique ownership
// of an object](/common-tasks/unique-ownership.html).
// of an object](/patterns/unique-ownership.html).
2 changes: 1 addition & 1 deletion common-tasks/memory-management/unique-ownership.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int main()
// function.
//
// In other cases, you may instead wish to
// [share ownership of an object](/common-tasks/shared-ownership.html).
// [share ownership of an object](/patterns/shared-ownership.html).
//
// **Note**: `std::make_unique` was introduced in C++14. For C++11,
// you can [roll your own implementation](http://stackoverflow.com/a/17902439/150634).
4 changes: 2 additions & 2 deletions common-tasks/memory-management/use-raii-types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ int main()
//
// Likewise, it is good practice to ensure your own classes also
// implement the RAII idiom with the
// [rule of five](/common-tasks/rule-of-five.html)
// or [rule of zero](/common-tasks/rule-of-zero.html).
// [rule of five](/patterns/rule-of-five.html)
// or [rule of zero](/patterns/rule-of-zero.html).
2 changes: 1 addition & 1 deletion common-tasks/random/choose-random-element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int main()
// On [9], we create a [`std::vector`](cpp/container/vector) from
// which we want to select a random element.
//
// We then effectively [roll a die](/common-tasks/roll-a-die.html)
// We then effectively [roll a die](/patterns/roll-a-die.html)
// where the numbers on the die are the indices of elements in the
// container. That is, we seed the
// [`std::mt19937`](cpp/numeric/random/mersenne_twister_engine) on
Expand Down
2 changes: 1 addition & 1 deletion common-tasks/ranges/range-based-algorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void algorithm(ForwardRange& range)
//
// If the iterators are not necessary to implement the algorithm, we
// may instead be able to use a simple
// [range-based `for` loop](/common-tasks/range-iteration.html).
// [range-based `for` loop](/patterns/range-iteration.html).

#include <forward_list>

Expand Down
2 changes: 1 addition & 1 deletion common-tasks/time/fixed-time-step.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ int main()
// This technique is most commonly used in a loop to ensure that the
// loop iterates with a fixed time step. Alternatively, if you want to
// sleep for a fixed amount of time, see the [sleep
// sample](/common-tasks/sleep.html).
// sample](/patterns/sleep.html).

void some_complex_work() { }

0 comments on commit a222c84

Please sign in to comment.