diff options
Diffstat (limited to 'gdbsupport')
-rw-r--r-- | gdbsupport/fileio.h | 2 | ||||
-rw-r--r-- | gdbsupport/filestuff.cc | 2 | ||||
-rw-r--r-- | gdbsupport/gdb_tilde_expand.cc | 6 | ||||
-rw-r--r-- | gdbsupport/observable.h | 20 | ||||
-rw-r--r-- | gdbsupport/parallel-for.h | 4 |
5 files changed, 15 insertions, 19 deletions
diff --git a/gdbsupport/fileio.h b/gdbsupport/fileio.h index 690ee21..846fb66 100644 --- a/gdbsupport/fileio.h +++ b/gdbsupport/fileio.h @@ -59,7 +59,7 @@ #define FILEIO_S_IRWXO 07 #define FILEIO_S_SUPPORTED (FILEIO_S_IFREG|FILEIO_S_IFDIR| \ FILEIO_S_IRWXU|FILEIO_S_IRWXG| \ - FILEIO_S_IRWXO) + FILEIO_S_IRWXO) /* lseek(2) flags */ #define FILEIO_SEEK_SET 0 diff --git a/gdbsupport/filestuff.cc b/gdbsupport/filestuff.cc index d733210..1724bc5 100644 --- a/gdbsupport/filestuff.cc +++ b/gdbsupport/filestuff.cc @@ -527,7 +527,7 @@ read_text_file_to_string (const char *path) gdb_assert (n < chunk_size); /* Less than CHUNK means EOF or error. If it's an error, return - no value. */ + no value. */ if (ferror (file.get ())) return {}; diff --git a/gdbsupport/gdb_tilde_expand.cc b/gdbsupport/gdb_tilde_expand.cc index d6bdb87..6107121 100644 --- a/gdbsupport/gdb_tilde_expand.cc +++ b/gdbsupport/gdb_tilde_expand.cc @@ -90,10 +90,8 @@ gdb_tilde_expand (const char *dir) /* Look for the first dir separator (if any) and split d around it. */ const auto first_sep = std::find_if (d.cbegin (), d.cend(), - [] (const char c) -> bool - { - return IS_DIR_SEPARATOR (c); - }); + [] (const char c) -> bool + { return IS_DIR_SEPARATOR (c); }); const std::string to_expand (d.cbegin (), first_sep); const std::string remainder (first_sep, d.cend ()); diff --git a/gdbsupport/observable.h b/gdbsupport/observable.h index 1a009ef..f1504c8 100644 --- a/gdbsupport/observable.h +++ b/gdbsupport/observable.h @@ -194,14 +194,14 @@ private: for (const token *dep : m_observers[index].dependencies) { /* ... find the observer that has token DEP. If found, visit it. */ - auto it_dep - = std::find_if (m_observers.begin (), m_observers.end (), - [&] (observer o) { return o.token == dep; }); - if (it_dep != m_observers.end ()) - { - int i = std::distance (m_observers.begin (), it_dep); - visit_for_sorting (sorted_observers, visit_states, i); - } + auto it_dep + = std::find_if (m_observers.begin (), m_observers.end (), + [&] (observer o) { return o.token == dep; }); + if (it_dep != m_observers.end ()) + { + int i = std::distance (m_observers.begin (), it_dep); + visit_for_sorting (sorted_observers, visit_states, i); + } } visit_states[index] = detail::visit_state::VISITED; @@ -226,11 +226,11 @@ private: } void attach (const func_type &f, const token *t, const char *name, - const std::vector<const struct token *> &dependencies) + const std::vector<const struct token *> &dependencies) { observer_debug_printf ("Attaching observable %s to observer %s", - name, m_name); + name, m_name); m_observers.emplace_back (t, f, name, dependencies); diff --git a/gdbsupport/parallel-for.h b/gdbsupport/parallel-for.h index de9ebb1..b57f7ea 100644 --- a/gdbsupport/parallel-for.h +++ b/gdbsupport/parallel-for.h @@ -271,9 +271,7 @@ parallel_for_each (unsigned n, RandomIt first, RandomIt last, debug_printf (_("\n")); } results.post (i, [=] () - { - return callback (first, end); - }); + { return callback (first, end); }); first = end; } |