summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-03-13 18:34:52 +0100
committerGitHub <noreply@github.com>2020-03-13 18:34:52 +0100
commitf569652bf8f860eb33195c6cc9968c5ff3ac87e8 (patch)
tree3c818fd332015df0c6a3be28e45efde6d7feda3a
parentd87ae65d2cf94e67ae3a2e77728455d50d5799a8 (diff)
parentca7a968b62d081e3f392cfee5c415924276d95bf (diff)
downloadATCD-f569652bf8f860eb33195c6cc9968c5ff3ac87e8.tar.gz
Merge pull request #1056 from jwillemsen/jwi-logcatconst
Const enhancements
-rw-r--r--ACE/ace/Log_Category.h18
-rw-r--r--ACE/ace/Log_Category.inl12
2 files changed, 14 insertions, 16 deletions
diff --git a/ACE/ace/Log_Category.h b/ACE/ace/Log_Category.h
index a7f11a36078..8e1d898d924 100644
--- a/ACE/ace/Log_Category.h
+++ b/ACE/ace/Log_Category.h
@@ -144,18 +144,17 @@ class ACE_Log_Category;
*
* @see ACE_Log_Categy
*/
-
class ACE_Export ACE_Log_Category_TSS
{
public:
ACE_Log_Category_TSS(ACE_Log_Category* category, ACE_Log_Msg* logger);
- const char* name();
- unsigned int id();
+ const char* name() const;
+ unsigned int id() const;
ACE_Log_Msg* logger();
/// Get the current ACE_Log_Priority mask.
- u_long priority_mask ();
+ u_long priority_mask () const;
/// Set the ACE_Log_Priority mask, returns original mask.
u_long priority_mask (u_long);
@@ -233,9 +232,9 @@ private:
* object would also be disabled regardless of the @c priority_mask
* setting in the @c ACE_Log_Category object.
*
- * Each cateogry can have a name which
+ * Each category can have a name which
* is fixed at construction. The name is not used for
- * formating the messages. However, it can be used by a
+ * formatting the messages. However, it can be used by a
* message backend object for identification and reformat
* accordingly.
*
@@ -256,7 +255,6 @@ private:
class ACE_Export ACE_Log_Category
{
public:
-
/**
* Initialize the logger with a name.
*
@@ -271,13 +269,13 @@ public:
ACE_Log_Category(const char* name);
~ACE_Log_Category();
- unsigned int id();
- const char* name();
+ unsigned int id() const;
+ const char* name() const;
ACE_Log_Category_TSS* per_thr_obj();
/// Get the process ACE_Log_Priority mask.
- u_long priority_mask ();
+ u_long priority_mask () const;
/// Set the process ACE_Log_Priority mask, returns original mask.
u_long priority_mask (u_long);
diff --git a/ACE/ace/Log_Category.inl b/ACE/ace/Log_Category.inl
index 42fcf84dc4f..a8314bcfaed 100644
--- a/ACE/ace/Log_Category.inl
+++ b/ACE/ace/Log_Category.inl
@@ -2,25 +2,25 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE unsigned int
-ACE_Log_Category::id()
+ACE_Log_Category::id() const
{
return id_;
}
ACE_INLINE const char*
-ACE_Log_Category::name ()
+ACE_Log_Category::name () const
{
return name_;
}
ACE_INLINE unsigned int
-ACE_Log_Category_TSS::id()
+ACE_Log_Category_TSS::id() const
{
return category_->id_;
}
ACE_INLINE const char*
-ACE_Log_Category_TSS::name ()
+ACE_Log_Category_TSS::name () const
{
return category_->name_;
}
@@ -33,7 +33,7 @@ ACE_Log_Category_TSS::logger ()
/// Get the current ACE_Log_Priority mask.
ACE_INLINE u_long
-ACE_Log_Category_TSS::priority_mask ()
+ACE_Log_Category_TSS::priority_mask () const
{
return priority_mask_;
}
@@ -158,7 +158,7 @@ ACE_Log_Category_TSS::log_hexdump (ACE_Log_Priority priority,
/// Get the current ACE_Log_Priority mask.
ACE_INLINE u_long
-ACE_Log_Category::priority_mask ()
+ACE_Log_Category::priority_mask () const
{
return priority_mask_;
}