-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Reviewdog action-cpplint sample PR #2
base: master
Are you sure you want to change the base?
Changes from all commits
23434f6
3ec9d4c
2addb2b
8889f99
6e9d6aa
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
// | ||
#include <atomic> | ||
#include "test.hpp" | ||
#include <iostream> | ||
|
||
|
@@ -13,9 +14,24 @@ class Hoge | |
int m_a; | ||
}; | ||
|
||
// https://github.com/yohhoy/cpp-longest-identifier/wiki | ||
bool longest_identifier() | ||
{ | ||
std::atomic<int> x(3); | ||
|
||
int expected = 3; | ||
const bool result = std::atomic_compare_exchange_strong_explicit(&x, &expected, 2, | ||
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. [cpplint] reported by reviewdog 🐶 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. [cpplint] reported by reviewdog 🐶 |
||
std::memory_order_acquire, | ||
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. [cpplint] reported by reviewdog 🐶 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. [cpplint] reported by reviewdog 🐶 |
||
std::memory_order_acquire); | ||
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. [cpplint] reported by reviewdog 🐶 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. [cpplint] reported by reviewdog 🐶 |
||
|
||
std::cout << std::boolalpha << result << " " << x.load() << " " << expected << std::endl; | ||
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. [cpplint] reported by reviewdog 🐶 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. [cpplint] reported by reviewdog 🐶 |
||
return result; | ||
} | ||
|
||
int main(int, const char**) | ||
{ | ||
Hoge hoge(42); | ||
longest_identifier(); | ||
std::cout << hoge.getA() << std::endl; | ||
return 0; | ||
} |
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.
[cpplint] reported by reviewdog 🐶
{ should almost always be at the end of the previous line [whitespace/braces] [4]