From 04b25f18f457e3864f271d6c2f0f03a93d78bd1d Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Wed, 21 Jun 2023 08:31:07 -0400 Subject: cleaning up includes and a couple comments --- bench/bench_window.hpp | 2 ++ bench/core_widget.hpp | 2 ++ include/lib94/lib94.hpp | 4 +--- lib94/core.cpp | 5 ++--- lib94/executors.cpp | 2 -- lib94/warrior.cpp | 4 ++-- tabulator-mpi/head.cpp | 1 - tabulator-mpi/worker.cpp | 1 + 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/bench/bench_window.hpp b/bench/bench_window.hpp index ae75e51..8f0124e 100644 --- a/bench/bench_window.hpp +++ b/bench/bench_window.hpp @@ -1,8 +1,10 @@ #ifndef LIB94_BENCH_BENCH_WINDOW_HPP #define LIB94_BENCH_BENCH_WINDOW_HPP +#include #include #include +#include #include "core_widget.hpp" diff --git a/bench/core_widget.hpp b/bench/core_widget.hpp index 78797c9..cb60ec1 100644 --- a/bench/core_widget.hpp +++ b/bench/core_widget.hpp @@ -3,6 +3,8 @@ #include #include +#include +#include class core_widget : public Gtk::Widget { public: diff --git a/include/lib94/lib94.hpp b/include/lib94/lib94.hpp index b3898d2..b8da8a8 100644 --- a/include/lib94/lib94.hpp +++ b/include/lib94/lib94.hpp @@ -1,11 +1,9 @@ #ifndef LIB94_LIB94_HPP #define LIB94_LIB94_HPP -#include #include -#include +#include #include -#include #include #include #include diff --git a/lib94/core.cpp b/lib94/core.cpp index a19e6b7..db1a911 100644 --- a/lib94/core.cpp +++ b/lib94/core.cpp @@ -1,9 +1,8 @@ #include #include +#include #include #include -#include -#include namespace lib94 { @@ -70,7 +69,7 @@ namespace lib94 { new_place_at: number_t place_at = i == 0 ? 0 : number(prng); - for (std::pair &other : placements) + for (const std::pair &other : placements) //there has to be a better way for (number_t i = 0; i < (number_t)w->instructions.size(); ++i) if (((place_at + i) % LIB94_CORE_SIZE >= other.first && (place_at + i) % LIB94_CORE_SIZE < other.first + other.second) || diff --git a/lib94/executors.cpp b/lib94/executors.cpp index 12b371c..0e75cfa 100644 --- a/lib94/executors.cpp +++ b/lib94/executors.cpp @@ -2,8 +2,6 @@ #include #include -#include - namespace lib94 { void enqueue_process(number_t pc); diff --git a/lib94/warrior.cpp b/lib94/warrior.cpp index 7c4d67e..95c61a0 100644 --- a/lib94/warrior.cpp +++ b/lib94/warrior.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include @@ -78,7 +77,7 @@ namespace lib94 { unsigned source_line_number; }; - //internal stage used by stage 1. also records the name and author outputs. + //internal state used by stage 1. also records some information passed to later stages. struct preprocessor_state { std::optional name; std::optional author; @@ -515,6 +514,7 @@ namespace lib94 { } + //some information collected in stage 2 struct parser_state { label_offset_set label_offsets; std::unique_ptr org_expr; diff --git a/tabulator-mpi/head.cpp b/tabulator-mpi/head.cpp index 7026746..38fcde6 100644 --- a/tabulator-mpi/head.cpp +++ b/tabulator-mpi/head.cpp @@ -1,5 +1,4 @@ #include -#include #include #include diff --git a/tabulator-mpi/worker.cpp b/tabulator-mpi/worker.cpp index 55121aa..511a27a 100644 --- a/tabulator-mpi/worker.cpp +++ b/tabulator-mpi/worker.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "constants.hpp" -- cgit v1.2.3