Skip to content

Commit

Permalink
Zavrsena je stavka 07 za clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Robotmurlock committed Nov 23, 2021
1 parent 82185c3 commit 57eb36b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,6 @@ callgrind.out.*
callgrind.out

# Python
__pycache__
__pycache__

**/build
Binary file removed tema06_clangtools/02_cmake/build/run
Binary file not shown.
19 changes: 19 additions & 0 deletions tema06_clangtools/07_readibility/new.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>
#include <stack>

int main()
{
std::stack<int> s;
s.push(3);
s.push(8);
s.push(9);
s.push(7);

while(!s.empty())
{
std::cout << s.top() << " ";
s.pop();
}

return 0;
}
19 changes: 19 additions & 0 deletions tema06_clangtools/07_readibility/old.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>
#include <stack>

int main()
{
std::stack<int> s;
s.push(3);
s.push(8);
s.push(9);
s.push(7);

while(s.size() > 0)
{
std::cout << s.top() << " ";
s.pop();
}

return 0;
}

0 comments on commit 57eb36b

Please sign in to comment.