aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cxx/include/aesnixx
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-07-27 00:11:09 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-07-27 00:11:09 +0300
commit304d00e5226a64707ec7ab74c06fd35a96e55389 (patch)
tree367139d67b3841a2a968c71766d1a81f7bf0451e /cxx/include/aesnixx
parentutils: fix usage messages (diff)
downloadaes-tools-304d00e5226a64707ec7ab74c06fd35a96e55389.tar.gz
aes-tools-304d00e5226a64707ec7ab74c06fd35a96e55389.zip
code style
Diffstat (limited to '')
-rw-r--r--cxx/include/aesnixx/debug.hpp8
-rw-r--r--cxx/include/aesnixx/error.hpp16
2 files changed, 12 insertions, 12 deletions
diff --git a/cxx/include/aesnixx/debug.hpp b/cxx/include/aesnixx/debug.hpp
index bb21f74..6c92a95 100644
--- a/cxx/include/aesnixx/debug.hpp
+++ b/cxx/include/aesnixx/debug.hpp
@@ -32,14 +32,14 @@ namespace aesni
CallStackFormatter()
{
#ifdef WIN32
- m_valid = SymInitialize(GetCurrentProcess(), NULL, TRUE) ? true : false;
+ valid_flag = SymInitialize(GetCurrentProcess(), NULL, TRUE) ? true : false;
#endif
}
std::string format(void* addr) const
{
#ifdef WIN32
- if (!m_valid)
+ if (!valid_flag)
return format_fallback(addr);
DWORD64 symbol_info_buf[sizeof(SYMBOL_INFO) + MAX_SYM_NAME];
@@ -73,7 +73,7 @@ namespace aesni
~CallStackFormatter()
{
#ifdef WIN32
- if (m_valid)
+ if (valid_flag)
SymCleanup(GetCurrentProcess());
#endif
}
@@ -119,7 +119,7 @@ namespace aesni
}
#ifdef WIN32
- bool m_valid = false;
+ bool valid_flag = false;
#endif
};
}
diff --git a/cxx/include/aesnixx/error.hpp b/cxx/include/aesnixx/error.hpp
index 5366c0b..552f832 100644
--- a/cxx/include/aesnixx/error.hpp
+++ b/cxx/include/aesnixx/error.hpp
@@ -36,7 +36,7 @@ namespace aesni
void for_each_in_call_stack(const std::function<void (void*, const std::string&)>& callback) const
{
aux::CallStackFormatter formatter;
- std::for_each(m_call_stack, m_call_stack + m_call_stack_size, [&formatter, &callback] (void* addr)
+ std::for_each(call_stack, call_stack + call_stack_size, [&formatter, &callback] (void* addr)
{
callback(addr, formatter.format(addr));
});
@@ -53,12 +53,12 @@ namespace aesni
void copy_call_stack(const AesNI_ErrorDetails& err_details)
{
- m_call_stack_size = err_details.call_stack_size;
- std::memcpy(m_call_stack, err_details.call_stack, m_call_stack_size * sizeof(void*));
+ call_stack_size = err_details.call_stack_size;
+ std::memcpy(call_stack, err_details.call_stack, call_stack_size * sizeof(void*));
}
- void* m_call_stack[AESNI_MAX_CALL_STACK_LENGTH];
- std::size_t m_call_stack_size;
+ void* call_stack[AESNI_MAX_CALL_STACK_LENGTH];
+ std::size_t call_stack_size;
};
std::ostream& operator<<(std::ostream& os, const Error& e)
@@ -87,14 +87,14 @@ namespace aesni
#endif
{
if (aesni_is_error(aesni_get_error_code(get())))
- throw Error(m_impl);
+ throw Error(impl);
}
- AesNI_ErrorDetails* get() { return &m_impl; }
+ AesNI_ErrorDetails* get() { return &impl; }
operator AesNI_ErrorDetails*() { return get(); }
private:
- AesNI_ErrorDetails m_impl;
+ AesNI_ErrorDetails impl;
};
}