[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 298a5fe6a2 296/323: Fix starter/beardbolt.cpp
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 298a5fe6a2 296/323: Fix starter/beardbolt.cpp |
Date: |
Thu, 9 Mar 2023 10:58:51 -0500 (EST) |
branch: externals/beardbolt
commit 298a5fe6a282ecdcd730ebd549760f510477d8d0
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix starter/beardbolt.cpp
Had sub-par C++ and now displays all useful options.
---
beardbolt.gif | Bin 410569 -> 664545 bytes
starters/beardbolt.cpp | 21 ++++++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/beardbolt.gif b/beardbolt.gif
index 38d4ed62c7..93de040914 100644
Binary files a/beardbolt.gif and b/beardbolt.gif differ
diff --git a/starters/beardbolt.cpp b/starters/beardbolt.cpp
index 30582dc150..835cf167f1 100644
--- a/starters/beardbolt.cpp
+++ b/starters/beardbolt.cpp
@@ -1,10 +1,9 @@
#include <iostream>
#include <array>
#include <vector>
-#include <span>
-template <typename F, typename T >
-void bubble(F from, T to) {
+template <typename It>
+void bubble(It from, It to) {
for (auto i = from; i < to - 1; i++)
for (auto j = to - 1; i < j; j--)
if (*j < *(j - 1))
@@ -12,15 +11,19 @@ void bubble(F from, T to) {
}
int main() {
- std::array a{5, 2, 1, 4, 2};
- bubble(a.begin(), a.end());
+ std::vector v{5, 2, 1, 4, 2};
+ bubble(v.begin(), v.end());
- std::cout << " Sorted array : ";
- for (const auto& e : a) std::cout << e << "\n";
+ std::cout << "Sorted array : ";
+ for (const auto& e : v) std::cout << e << "\n";
return 0;
}
// Local Variables:
-// beardbolt-command: "g++ -std=c++20 -O3"
-// beardbolt-kill-symbol-re: "\\(^_Z[^0-9]*[SP]\\|__\\)"
+// beardbolt-command: "g++ -std=c++20 -O0"
+// beardbolt-demangle: t
+// beardbolt-disassemble: nil
+// beardbolt-preserve-library-functions: nil
+// beardbolt-preserve-unused-labels: nil
+// beardbolt-preserve-directives: nil
// End:
- [elpa] externals/beardbolt 16f887917b 252/323: Improve rainbow color selection algorithm, (continued)
- [elpa] externals/beardbolt 16f887917b 252/323: Improve rainbow color selection algorithm, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9bc7e8aeb8 236/323: Remove `rmsbolt--post-command-hook` when mode is deactivated, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 660739681c 254/323: Rename every rms* file to beard*, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt f846655a35 250/323: Rework rmsbolt-rainbowize to reuse more code, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 78eed53af1 260/323: Don't hang a "[Compiling]" forever in the mode-line, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b71d1bd763 265/323: * beardbolt.el (bb-compile): Fix handling of bb-asm-format., ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4cbe58f834 279/323: Add -g1 instead of -g to speed it up massively, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2542f24813 285/323: Tweak, rework, speed up main algorithm again, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 85bc714336 295/323: Simplify source file tracking, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c5086ea624 294/323: bb--output-mode now a major mode, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 298a5fe6a2 296/323: Fix starter/beardbolt.cpp,
ELPA Syncer <=
- [elpa] externals/beardbolt 067096f3b9 299/323: Friendlier beardbolt--output-mode, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0ae21a302a 302/323: Simplify window management in preparation of beardbolt-execute-program, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 842b2159da 305/323: More simplification, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 60d189b0a6 310/323: Advertise beardbolt-execute and a few other things, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c374b17f5c 314/323: Don't require file to be saved, but do take advantage if it is, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4a050afaaa 315/323: Attempt to fix more window management bugs, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0d61c2edac 311/323: Add support for rustc, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt be3cf0a712 318/323: Fix problems with beardbolt-compile when file is saved, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 349ace7310 164/323: Merge branch 'master' of gitlab.com:jgkamat/rmsbolt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5aeda6f846 155/323: Add basic documentation for compile_commands.json, ELPA Syncer, 2023/03/09