Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BasedOnStyle: LLVM
BasedOnStyle: LLVM
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@ jobs:
enable-windows: true
enable-macos: true
warnings-as-errors: true

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
.vscode/
build/
cmake-build-*
CMakeUserPresets.json
CMakeUserPresets.json
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-json
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
types_or: [c++, c]
52 changes: 43 additions & 9 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,54 @@
"name": "base",
"hidden": true
},
{ "name": "debug", "inherits": "base", "configurePreset": "debug" },
{ "name": "release", "inherits": "base", "configurePreset": "release" },
{ "name": "asan", "inherits": "base", "configurePreset": "asan" },
{ "name": "tsan", "inherits": "base", "configurePreset": "tsan" }
{
"name": "debug",
"inherits": "base",
"configurePreset": "debug"
},
{
"name": "release",
"inherits": "base",
"configurePreset": "release"
},
{
"name": "asan",
"inherits": "base",
"configurePreset": "asan"
},
{
"name": "tsan",
"inherits": "base",
"configurePreset": "tsan"
}
],
"testPresets": [
{
"name": "base",
"hidden": true,
"output": { "outputOnFailure": true }
"output": {
"outputOnFailure": true
}
},
{ "name": "debug", "inherits": "base", "configurePreset": "debug" },
{ "name": "release", "inherits": "base", "configurePreset": "release" },
{ "name": "asan", "inherits": "base", "configurePreset": "asan" },
{ "name": "tsan", "inherits": "base", "configurePreset": "tsan" }
{
"name": "debug",
"inherits": "base",
"configurePreset": "debug"
},
{
"name": "release",
"inherits": "base",
"configurePreset": "release"
},
{
"name": "asan",
"inherits": "base",
"configurePreset": "asan"
},
{
"name": "tsan",
"inherits": "base",
"configurePreset": "tsan"
}
]
}
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

4 changes: 2 additions & 2 deletions include/rigtorp/HashMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class HashMap {
}

template <typename... Args>
std::pair<iterator, bool> emplace(Args &&... args) {
std::pair<iterator, bool> emplace(Args &&...args) {
return emplace_impl(std::forward<Args>(args)...);
}

Expand Down Expand Up @@ -230,7 +230,7 @@ class HashMap {

private:
template <typename K, typename... Args>
std::pair<iterator, bool> emplace_impl(const K &key, Args &&... args) {
std::pair<iterator, bool> emplace_impl(const K &key, Args &&...args) {
assert(!key_equal()(empty_key_, key) && "empty key shouldn't be used");
reserve(size_ + 1);
for (size_t idx = key_to_idx(key);; idx = probe_next(idx)) {
Expand Down
Loading