laugh.cpp: In function 'int longest_laugh(std::string)':
laugh.cpp:7:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
7 | if (s.size() == 1 and s[0] == 'a' or s[0] == 'h') {
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
laugh.cpp:11:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
11 | for (int i = 0; i < s.size(); ++i) {
| ~~^~~~~~~~~~
laugh.cpp:15:61: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
15 | else if ((s[i] == 'a' and s[i - 1] == 'h' and i + 1 != s.size() and s[i + 1] == 'a') or (s[i] == 'h' and s[i - 1] == 'a' and i + 1 != s.size() and s[i + 1] == 'h')) {
| ~~~~~~^~~~~~~~~~~
laugh.cpp:15:140: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
15 | else if ((s[i] == 'a' and s[i - 1] == 'h' and i + 1 != s.size() and s[i + 1] == 'a') or (s[i] == 'h' and s[i - 1] == 'a' and i + 1 != s.size() and s[i + 1] == 'h')) {
| ~~~~~~^~~~~~~~~~~