Skip to content

Commit 71fa0ed

Browse files
authored
Merge branch 'master' into Remove-trailing-whitespace
2 parents f58462f + 94af2ae commit 71fa0ed

4 files changed

+16
-11
lines changed

Diff for: 02-Use_the_Tools_Available.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Use an industry standard widely accepted build tool. This prevents you from rein
3535
* [meson](http://mesonbuild.com/index.html) - Open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible.
3636
* [premake](https://premake.github.io/)
3737
* [xmake](https://xmake.io) - A cross-platform build utility based on Lua. Modern C/C++ build tools, Support multi-language hybrid compilation
38+
* [build2](https://build2.org) - A cargo-like complete toolchain (build system, package manager, project manager)
3839

3940
Remember, it's not just a build tool, it's also a programming language. Try to maintain good clean build scripts and follow the recommended practices for the tool you are using.
4041

@@ -46,9 +47,10 @@ Package management is an important topic in C++, with currently no clear winner.
4647
* [hunter](https://github.com/ruslo/hunter) - CMake driven cross-platform package manager for C/C++
4748
* [C++ Archive Network (CPPAN)](https://cppan.org/) - a crossplatform dependency manager for C++
4849
* [qpm](https://www.qpm.io/) - Package manager for Qt
49-
* [build2](https://build2.org/) - cargo-like package management for C++
50+
* [build2](https://build2.org/) - A cargo-like complete toolchain (build system, package manager, project manager)
5051
* [Buckaroo](https://buckaroo.pm) - Truly decentralized cross-platform dependency manager for C/C++ and more
5152
* [Vcpkg](https://github.com/microsoft/vcpkg) - Microsoft C++ Library Manager for Windows, Linux, and MacOS - [description](https://docs.microsoft.com/en-us/cpp/build/vcpkg)
53+
* [CPM](https://github.com/cpm-cmake/CPM.cmake) - CMake package manager for modern CMake
5254

5355
## Continuous Integration
5456

@@ -101,8 +103,9 @@ You should use as many compilers as you can for your platform(s). Each compiler
101103

102104
### GCC / Clang
103105

104-
`-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic`
106+
`-Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic` - use these and consider the following (see descriptions below)
105107

108+
* `-pedantic` - Warn on language extensions
106109
* `-Wall -Wextra` reasonable and standard
107110
* `-Wshadow` warn the user if a variable declaration shadows one from a parent context
108111
* `-Wnon-virtual-dtor` warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors
@@ -293,6 +296,7 @@ A coverage analysis tool shall be run when tests are executed to make sure the e
293296
### Reverse engineering tools
294297

295298
* [Cutter](https://cutter.re/) - A front-end for [Radare2](https://www.radare.org/n/radare2.html). It provides tools such as decompiler, disassembly, graph visualizer, hex editor.
299+
* [Ghidra](https://ghidra-sre.org/) - Ghidra is a free and open source reverse engineering tool developed by the National Security Agency (NSA) of the United States.
296300

297301
### GCC / Clang Sanitizers
298302

@@ -338,10 +342,6 @@ MSVC's [Control Flow Guard](https://msdn.microsoft.com/en-us/library/windows/des
338342

339343
* `_GLIBCXX_DEBUG` with GCC's implementation libstdc++ implementation. See [Krister's blog article](https://kristerw.blogspot.se/2018/03/detecting-incorrect-c-stl-usage.html).
340344

341-
### Heap Profiling
342-
343-
* [Memoro](https://epfl-vlsc.github.io/memoro/) - A detailed heap profiler
344-
345345
## Ignoring Warnings
346346

347347
If it is determined by team consensus that the compiler or analyzer is warning on something that is either incorrect or unavoidable, the team will disable the specific error to as localized part of the code as possible.

Diff for: 04-Considering_Safety.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private:
8080
}
8181
```
8282

83-
Why? Because passing and returning by reference leads to pointer operations instead by much more faster passing values in processor registers.
83+
Why? Because passing and returning by reference leads to pointer operations, instead of much faster passing of values in processor registers.
8484

8585
## Avoid Raw Memory Access
8686

@@ -142,4 +142,4 @@ If you have the possibility to use a compiler that supports C++11, you can use v
142142

143143
## Additional Resources
144144

145-
[How to Prevent The Next Heartbleed](http://www.dwheeler.com/essays/heartbleed.html) by David Wheeler is a good analysis of the current state of code safety and how to ensure safe code.
145+
[How to Prevent The Next Heartbleed](https://dwheeler.com/essays/heartbleed.html) by David Wheeler is a good analysis of the current state of code safety and how to ensure safe code.

Diff for: 08-Considering_Performance.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,13 @@ If on Linux, consider using the gold linker for GCC.
103103

104104
There's no real way to know where your bottlenecks are without analyzing the code.
105105

106-
* http://developer.amd.com/tools-and-sdks/opencl-zone/codexl/
107-
* http://www.codersnotes.com/sleepy
106+
A list of code profilers:
107+
* [Intel VTune](https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html)
108+
* [Coz - Causal Profiling](https://github.com/plasma-umass/coz)
109+
* [Sleepy](http://www.codersnotes.com/sleepy)
110+
* [Dyninst](https://dyninst.org/)
111+
* [AMD CodeXL](https://github.com/GPUOpen-Archive/CodeXL)
112+
* [lukestackwalker](http://lukestackwalker.sourceforge.net/)
108113

109114
### Simplify the Code
110115

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ For more information please see the [Preface](01-Preface.md).
99
This online resource is part of Jason Turner's collection of C++ Best Practices resources.
1010

1111
* [C++ Best Practices Book](https://leanpub.com/cppbestpractices)
12-
* [C++ Weekly YouTube Channel](https://www.youtube.com/c/JasonTurner-lefticus)
12+
* [C++ Weekly YouTube Channel](https://www.youtube.com/user/lefticus1)
1313
* [The Ultimate CMake/C++ Starter Project](https://github.com/lefticus/cpp_starter_project/)
1414
* [Learning C++ Best Practices - O'Reilly Video](http://shop.oreilly.com/product/0636920049814.do)

0 commit comments

Comments
 (0)