Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate non-dependent thread_info logging types #2986

Merged
merged 1 commit into from Nov 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions hpx/util/logging/detail/cache_before_init.hpp
Expand Up @@ -57,6 +57,13 @@ inline thread_id_type get_thread_id()
#endif
}

typedef bool (*is_enabled_func)();

struct thread_info {
thread_info() : last_enabled(nullptr) {}
is_enabled_func last_enabled;
};

#if defined( HPX_LOG_BEFORE_INIT_USE_CACHE_FILTER) \
|| defined( HPX_LOG_BEFORE_INIT_USE_LOG_ALL)
//////////////////////////////////////////////////////////////////
Expand All @@ -73,8 +80,6 @@ inline thread_id_type get_thread_id()
*/
template<class msg_type> struct cache_before_init {
private:
typedef bool (*is_enabled_func)();

struct message {
message(is_enabled_func is_enabled_, msg_type string_)
: is_enabled(is_enabled_), string(string_) {}
Expand All @@ -84,11 +89,6 @@ template<class msg_type> struct cache_before_init {
msg_type string;
};

struct thread_info {
thread_info() : last_enabled(nullptr) {}
is_enabled_func last_enabled;
};

struct cache {
cache() : is_using_cache(true) {}

Expand Down