File 0004-Remove-const-qualifier-from-functions-returning-inte.patch of Package xplatproviders
From 5d721b737f09003d56cb1e8880e76ff2dcacc7c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Thu, 31 May 2012 17:41:33 +0200
Subject: [PATCH 4/4] Remove 'const' qualifier from functions returning
integral values
plus a couple of line ending fixes (cr/lf -> lf)
---
.../common_lib/pal/os/scxthreadlockfactory.cpp | 112 ++++----
.../code/common_lib/pal/os/scxthreadlockhandle.cpp | 2 +-
source/code/common_lib/pal/os/scxuser.cpp | 6 +-
.../code/common_lib/pal/system/cpu/cpuinstance.cpp | 116 ++++-----
.../code/common_lib/pal/system/disk/scxvgcfg.cpp | 112 ++++----
.../pal/system/memory/memoryinstance.cpp | 11 +-
source/code/include/scxcorelib/scxthreadlock.h | 114 ++++----
source/code/include/scxproviderlib/predicate.h | 274 ++++++++++----------
source/code/include/scxsystemlib/cpuinstance.h | 116 ++++-----
source/code/include/scxsystemlib/scxvgcfg.h | 112 ++++----
10 files changed, 493 insertions(+), 482 deletions(-)
diff --git a/source/code/common_lib/pal/os/scxthreadlockfactory.cpp b/source/code/common_lib/pal/os/scxthreadlockfactory.cpp
index 414ec89..fffa246 100644
--- a/source/code/common_lib/pal/os/scxthreadlockfactory.cpp
+++ b/source/code/common_lib/pal/os/scxthreadlockfactory.cpp
@@ -1,58 +1,58 @@
-/*
-**==============================================================================
-**
-** Microsoft Public License (Ms-PL)
-**
-** This license governs use of the accompanying software. If you use the
-** software, you accept this license. If you do not accept the license, do not
-** use the software.
-**
-** 1. Definitions
-** The terms "reproduce," "reproduction," "derivative works," and
-** "distribution" have the same meaning here as under U.S. copyright law.
-** A "contribution" is the original software, or any additions or changes to
-** the software.
-** A "contributor" is any person that distributes its contribution under this
-** license.
-** "Licensed patents" are a contributor's patent claims that read directly on
-** its contribution.
-**
-** 2. Grant of Rights
-** (A) Copyright Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
-** contribution, prepare derivative works of its contribution, and distribute
-** its contribution or any derivative works that you create.
-** (B) Patent Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free license under its licensed patents
-** to make, have made, use, sell, offer for sale, import, and/or otherwise
-** dispose of its contribution in the software or derivative works of the
-** contribution in the software.
-**
-** 3. Conditions and Limitations
-** (A) No Trademark License- This license does not grant you rights to use any
-** contributors' name, logo, or trademarks.
-** (B) If you bring a patent claim against any contributor over patents that
-** you claim are infringed by the software, your patent license from such
-** contributor to the software ends automatically.
-** (C) If you distribute any portion of the software, you must retain all
-** copyright, patent, trademark, and attribution notices that are present in
-** the software.
-** (D) If you distribute any portion of the software in source code form, you
-** may do so only under this license by including a complete copy of this
-** license with your distribution. If you distribute any portion of the
-** software in compiled or object code form, you may only do so under a license
-** that complies with this license.
-** (E) The software is licensed "as-is." You bear the risk of using it. The
-** contributors give no express warranties, guarantees or conditions. You may
-** have additional consumer rights under your local laws which this license
-** cannot change. To the extent permitted under your local laws, the
-** contributors exclude the implied warranties of merchantability, fitness for
-** a particular purpose and non-infringement.
-**
-**==============================================================================
-*/
+/*
+**==============================================================================
+**
+** Microsoft Public License (Ms-PL)
+**
+** This license governs use of the accompanying software. If you use the
+** software, you accept this license. If you do not accept the license, do not
+** use the software.
+**
+** 1. Definitions
+** The terms "reproduce," "reproduction," "derivative works," and
+** "distribution" have the same meaning here as under U.S. copyright law.
+** A "contribution" is the original software, or any additions or changes to
+** the software.
+** A "contributor" is any person that distributes its contribution under this
+** license.
+** "Licensed patents" are a contributor's patent claims that read directly on
+** its contribution.
+**
+** 2. Grant of Rights
+** (A) Copyright Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
+** contribution, prepare derivative works of its contribution, and distribute
+** its contribution or any derivative works that you create.
+** (B) Patent Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free license under its licensed patents
+** to make, have made, use, sell, offer for sale, import, and/or otherwise
+** dispose of its contribution in the software or derivative works of the
+** contribution in the software.
+**
+** 3. Conditions and Limitations
+** (A) No Trademark License- This license does not grant you rights to use any
+** contributors' name, logo, or trademarks.
+** (B) If you bring a patent claim against any contributor over patents that
+** you claim are infringed by the software, your patent license from such
+** contributor to the software ends automatically.
+** (C) If you distribute any portion of the software, you must retain all
+** copyright, patent, trademark, and attribution notices that are present in
+** the software.
+** (D) If you distribute any portion of the software in source code form, you
+** may do so only under this license by including a complete copy of this
+** license with your distribution. If you distribute any portion of the
+** software in compiled or object code form, you may only do so under a license
+** that complies with this license.
+** (E) The software is licensed "as-is." You bear the risk of using it. The
+** contributors give no express warranties, guarantees or conditions. You may
+** have additional consumer rights under your local laws which this license
+** cannot change. To the extent permitted under your local laws, the
+** contributors exclude the implied warranties of merchantability, fitness for
+** a particular purpose and non-infringement.
+**
+**==============================================================================
+*/
/**
\file
@@ -235,7 +235,7 @@ namespace SCXCoreLib
one reference is that in the factory lock handle list.
*/
- const unsigned int SCXThreadLockFactory::GetLocksUsed(void) const
+ unsigned int SCXThreadLockFactory::GetLocksUsed(void) const
{
SCXThreadLock lock(m_lockHandle);
diff --git a/source/code/common_lib/pal/os/scxthreadlockhandle.cpp b/source/code/common_lib/pal/os/scxthreadlockhandle.cpp
index 2a4bd67..971d7db 100644
--- a/source/code/common_lib/pal/os/scxthreadlockhandle.cpp
+++ b/source/code/common_lib/pal/os/scxthreadlockhandle.cpp
@@ -604,7 +604,7 @@ namespace SCXCoreLib
This method is typically only used by the thread lock factory GetUsedLocks method.
*/
- const scxulong SCXThreadLockHandle::GetRefCount(void) const
+ scxulong SCXThreadLockHandle::GetRefCount(void) const
{
if (NULL == m_pImpl)
{
diff --git a/source/code/common_lib/pal/os/scxuser.cpp b/source/code/common_lib/pal/os/scxuser.cpp
index 2f0181e..2e10530 100644
--- a/source/code/common_lib/pal/os/scxuser.cpp
+++ b/source/code/common_lib/pal/os/scxuser.cpp
@@ -161,8 +161,10 @@ namespace SCXCoreLib
// Use reentrant form of getpwuid (it's reentrant, and it pacifies purify)
#if !defined(sun)
- int rc = 0;
- rc = getpwuid_r(m_uid, &pwd, &buf[0], buf.size(), &ppwd);
+#ifndef NDEBUG /* used in SCXASSERT only */
+ int rc =
+#endif
+ getpwuid_r(m_uid, &pwd, &buf[0], buf.size(), &ppwd);
SCXASSERT( (0 == rc && NULL != ppwd) || (0 != rc && NULL == ppwd) );
#else
ppwd = getpwuid_r(m_uid, &pwd, &buf[0], buf.size());
diff --git a/source/code/common_lib/pal/system/cpu/cpuinstance.cpp b/source/code/common_lib/pal/system/cpu/cpuinstance.cpp
index 0b3baa2..c1529eb 100644
--- a/source/code/common_lib/pal/system/cpu/cpuinstance.cpp
+++ b/source/code/common_lib/pal/system/cpu/cpuinstance.cpp
@@ -1,58 +1,58 @@
-/*
-**==============================================================================
-**
-** Microsoft Public License (Ms-PL)
-**
-** This license governs use of the accompanying software. If you use the
-** software, you accept this license. If you do not accept the license, do not
-** use the software.
-**
-** 1. Definitions
-** The terms "reproduce," "reproduction," "derivative works," and
-** "distribution" have the same meaning here as under U.S. copyright law.
-** A "contribution" is the original software, or any additions or changes to
-** the software.
-** A "contributor" is any person that distributes its contribution under this
-** license.
-** "Licensed patents" are a contributor's patent claims that read directly on
-** its contribution.
-**
-** 2. Grant of Rights
-** (A) Copyright Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
-** contribution, prepare derivative works of its contribution, and distribute
-** its contribution or any derivative works that you create.
-** (B) Patent Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free license under its licensed patents
-** to make, have made, use, sell, offer for sale, import, and/or otherwise
-** dispose of its contribution in the software or derivative works of the
-** contribution in the software.
-**
-** 3. Conditions and Limitations
-** (A) No Trademark License- This license does not grant you rights to use any
-** contributors' name, logo, or trademarks.
-** (B) If you bring a patent claim against any contributor over patents that
-** you claim are infringed by the software, your patent license from such
-** contributor to the software ends automatically.
-** (C) If you distribute any portion of the software, you must retain all
-** copyright, patent, trademark, and attribution notices that are present in
-** the software.
-** (D) If you distribute any portion of the software in source code form, you
-** may do so only under this license by including a complete copy of this
-** license with your distribution. If you distribute any portion of the
-** software in compiled or object code form, you may only do so under a license
-** that complies with this license.
-** (E) The software is licensed "as-is." You bear the risk of using it. The
-** contributors give no express warranties, guarantees or conditions. You may
-** have additional consumer rights under your local laws which this license
-** cannot change. To the extent permitted under your local laws, the
-** contributors exclude the implied warranties of merchantability, fitness for
-** a particular purpose and non-infringement.
-**
-**==============================================================================
-*/
+/*
+**==============================================================================
+**
+** Microsoft Public License (Ms-PL)
+**
+** This license governs use of the accompanying software. If you use the
+** software, you accept this license. If you do not accept the license, do not
+** use the software.
+**
+** 1. Definitions
+** The terms "reproduce," "reproduction," "derivative works," and
+** "distribution" have the same meaning here as under U.S. copyright law.
+** A "contribution" is the original software, or any additions or changes to
+** the software.
+** A "contributor" is any person that distributes its contribution under this
+** license.
+** "Licensed patents" are a contributor's patent claims that read directly on
+** its contribution.
+**
+** 2. Grant of Rights
+** (A) Copyright Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
+** contribution, prepare derivative works of its contribution, and distribute
+** its contribution or any derivative works that you create.
+** (B) Patent Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free license under its licensed patents
+** to make, have made, use, sell, offer for sale, import, and/or otherwise
+** dispose of its contribution in the software or derivative works of the
+** contribution in the software.
+**
+** 3. Conditions and Limitations
+** (A) No Trademark License- This license does not grant you rights to use any
+** contributors' name, logo, or trademarks.
+** (B) If you bring a patent claim against any contributor over patents that
+** you claim are infringed by the software, your patent license from such
+** contributor to the software ends automatically.
+** (C) If you distribute any portion of the software, you must retain all
+** copyright, patent, trademark, and attribution notices that are present in
+** the software.
+** (D) If you distribute any portion of the software in source code form, you
+** may do so only under this license by including a complete copy of this
+** license with your distribution. If you distribute any portion of the
+** software in compiled or object code form, you may only do so under a license
+** that complies with this license.
+** (E) The software is licensed "as-is." You bear the risk of using it. The
+** contributors give no express warranties, guarantees or conditions. You may
+** have additional consumer rights under your local laws which this license
+** cannot change. To the extent permitted under your local laws, the
+** contributors exclude the implied warranties of merchantability, fitness for
+** a particular purpose and non-infringement.
+**
+**==============================================================================
+*/
/**
\file
@@ -426,9 +426,9 @@ namespace SCXSystemLib
like when counter wraps or first time used in the provider.
*/
- const scxulong CPUInstance::GetPercentageSafe(const scxulong tic_delta,
- const scxulong tot_delta,
- const bool inverse /* = false */) const
+ scxulong CPUInstance::GetPercentageSafe(const scxulong tic_delta,
+ const scxulong tot_delta,
+ const bool inverse /* = false */) const
{
return GetPercentage(0, tic_delta, 0, tot_delta, inverse);
}
diff --git a/source/code/common_lib/pal/system/disk/scxvgcfg.cpp b/source/code/common_lib/pal/system/disk/scxvgcfg.cpp
index 4bd96b2..23acc5a 100644
--- a/source/code/common_lib/pal/system/disk/scxvgcfg.cpp
+++ b/source/code/common_lib/pal/system/disk/scxvgcfg.cpp
@@ -1,58 +1,58 @@
-/*
-**==============================================================================
-**
-** Microsoft Public License (Ms-PL)
-**
-** This license governs use of the accompanying software. If you use the
-** software, you accept this license. If you do not accept the license, do not
-** use the software.
-**
-** 1. Definitions
-** The terms "reproduce," "reproduction," "derivative works," and
-** "distribution" have the same meaning here as under U.S. copyright law.
-** A "contribution" is the original software, or any additions or changes to
-** the software.
-** A "contributor" is any person that distributes its contribution under this
-** license.
-** "Licensed patents" are a contributor's patent claims that read directly on
-** its contribution.
-**
-** 2. Grant of Rights
-** (A) Copyright Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
-** contribution, prepare derivative works of its contribution, and distribute
-** its contribution or any derivative works that you create.
-** (B) Patent Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free license under its licensed patents
-** to make, have made, use, sell, offer for sale, import, and/or otherwise
-** dispose of its contribution in the software or derivative works of the
-** contribution in the software.
-**
-** 3. Conditions and Limitations
-** (A) No Trademark License- This license does not grant you rights to use any
-** contributors' name, logo, or trademarks.
-** (B) If you bring a patent claim against any contributor over patents that
-** you claim are infringed by the software, your patent license from such
-** contributor to the software ends automatically.
-** (C) If you distribute any portion of the software, you must retain all
-** copyright, patent, trademark, and attribution notices that are present in
-** the software.
-** (D) If you distribute any portion of the software in source code form, you
-** may do so only under this license by including a complete copy of this
-** license with your distribution. If you distribute any portion of the
-** software in compiled or object code form, you may only do so under a license
-** that complies with this license.
-** (E) The software is licensed "as-is." You bear the risk of using it. The
-** contributors give no express warranties, guarantees or conditions. You may
-** have additional consumer rights under your local laws which this license
-** cannot change. To the extent permitted under your local laws, the
-** contributors exclude the implied warranties of merchantability, fitness for
-** a particular purpose and non-infringement.
-**
-**==============================================================================
-*/
+/*
+**==============================================================================
+**
+** Microsoft Public License (Ms-PL)
+**
+** This license governs use of the accompanying software. If you use the
+** software, you accept this license. If you do not accept the license, do not
+** use the software.
+**
+** 1. Definitions
+** The terms "reproduce," "reproduction," "derivative works," and
+** "distribution" have the same meaning here as under U.S. copyright law.
+** A "contribution" is the original software, or any additions or changes to
+** the software.
+** A "contributor" is any person that distributes its contribution under this
+** license.
+** "Licensed patents" are a contributor's patent claims that read directly on
+** its contribution.
+**
+** 2. Grant of Rights
+** (A) Copyright Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
+** contribution, prepare derivative works of its contribution, and distribute
+** its contribution or any derivative works that you create.
+** (B) Patent Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free license under its licensed patents
+** to make, have made, use, sell, offer for sale, import, and/or otherwise
+** dispose of its contribution in the software or derivative works of the
+** contribution in the software.
+**
+** 3. Conditions and Limitations
+** (A) No Trademark License- This license does not grant you rights to use any
+** contributors' name, logo, or trademarks.
+** (B) If you bring a patent claim against any contributor over patents that
+** you claim are infringed by the software, your patent license from such
+** contributor to the software ends automatically.
+** (C) If you distribute any portion of the software, you must retain all
+** copyright, patent, trademark, and attribution notices that are present in
+** the software.
+** (D) If you distribute any portion of the software in source code form, you
+** may do so only under this license by including a complete copy of this
+** license with your distribution. If you distribute any portion of the
+** software in compiled or object code form, you may only do so under a license
+** that complies with this license.
+** (E) The software is licensed "as-is." You bear the risk of using it. The
+** contributors give no express warranties, guarantees or conditions. You may
+** have additional consumer rights under your local laws which this license
+** cannot change. To the extent permitted under your local laws, the
+** contributors exclude the implied warranties of merchantability, fitness for
+** a particular purpose and non-infringement.
+**
+**==============================================================================
+*/
/**
\file
@@ -268,7 +268,7 @@ namespace SCXSystemLib {
\throws SCXVolumeGroupConfigurationException if the configuration does not
contain a sequence number.
*/
- const size_t SCXVolumeGroupConfiguration::GetSeqNo() const
+ size_t SCXVolumeGroupConfiguration::GetSeqNo() const
{
if (m_root.GetSections().size() != 1)
{
diff --git a/source/code/common_lib/pal/system/memory/memoryinstance.cpp b/source/code/common_lib/pal/system/memory/memoryinstance.cpp
index 2200c63..b17c0f0 100644
--- a/source/code/common_lib/pal/system/memory/memoryinstance.cpp
+++ b/source/code/common_lib/pal/system/memory/memoryinstance.cpp
@@ -743,11 +743,12 @@ namespace SCXSystemLib
SwapFree
*/
std::vector<std::wstring> lines = m_deps->GetMemInfoLines();
-
+#ifndef NDEBUG /* used in SCXASSERT only */
bool foundTotalPhysMem = false;
bool foundAvailMem = false;
bool foundTotalSwap = false;
bool foundAvailSwap = false;
+#endif
scxulong buffers = 0, cached = 0;
for (size_t i=0; i<lines.size(); i++)
@@ -765,7 +766,9 @@ namespace SCXSystemLib
try
{
m_totalPhysicalMemory = KiloBytesToMegaBytes(StrToULong(tokens[1]));
+#ifndef NDEBUG
foundTotalPhysMem = true;
+#endif
SCX_LOGHYSTERICAL(m_log, StrAppend(L" totalPhysicalMemory = ", m_totalPhysicalMemory));
}
catch (const SCXNotSupportedException& e)
@@ -778,7 +781,9 @@ namespace SCXSystemLib
try
{
m_availableMemory = KiloBytesToMegaBytes(StrToULong(tokens[1]));
+#ifndef NDEBUG
foundAvailMem = true;
+#endif
SCX_LOGHYSTERICAL(m_log, StrAppend(L" availableMemory = ", m_availableMemory));
}
catch (const SCXNotSupportedException& e)
@@ -815,7 +820,9 @@ namespace SCXSystemLib
try
{
m_totalSwap = KiloBytesToMegaBytes(StrToULong(tokens[1]));
+#ifndef NDEBUG
foundTotalSwap = true;
+#endif
SCX_LOGHYSTERICAL(m_log, StrAppend(L" totalSwap = ", m_totalSwap));
}
catch (const SCXNotSupportedException& e)
@@ -828,7 +835,9 @@ namespace SCXSystemLib
try
{
m_availableSwap = KiloBytesToMegaBytes(StrToULong(tokens[1]));
+#ifndef NDEBUG
foundAvailSwap = true;
+#endif
SCX_LOGHYSTERICAL(m_log, StrAppend(L" availableSwap = ", m_availableSwap));
}
catch (const SCXNotSupportedException& e)
diff --git a/source/code/include/scxcorelib/scxthreadlock.h b/source/code/include/scxcorelib/scxthreadlock.h
index 0fef4e1..cd5d1d6 100644
--- a/source/code/include/scxcorelib/scxthreadlock.h
+++ b/source/code/include/scxcorelib/scxthreadlock.h
@@ -1,58 +1,58 @@
-/*
-**==============================================================================
-**
-** Microsoft Public License (Ms-PL)
-**
-** This license governs use of the accompanying software. If you use the
-** software, you accept this license. If you do not accept the license, do not
-** use the software.
-**
-** 1. Definitions
-** The terms "reproduce," "reproduction," "derivative works," and
-** "distribution" have the same meaning here as under U.S. copyright law.
-** A "contribution" is the original software, or any additions or changes to
-** the software.
-** A "contributor" is any person that distributes its contribution under this
-** license.
-** "Licensed patents" are a contributor's patent claims that read directly on
-** its contribution.
-**
-** 2. Grant of Rights
-** (A) Copyright Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
-** contribution, prepare derivative works of its contribution, and distribute
-** its contribution or any derivative works that you create.
-** (B) Patent Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free license under its licensed patents
-** to make, have made, use, sell, offer for sale, import, and/or otherwise
-** dispose of its contribution in the software or derivative works of the
-** contribution in the software.
-**
-** 3. Conditions and Limitations
-** (A) No Trademark License- This license does not grant you rights to use any
-** contributors' name, logo, or trademarks.
-** (B) If you bring a patent claim against any contributor over patents that
-** you claim are infringed by the software, your patent license from such
-** contributor to the software ends automatically.
-** (C) If you distribute any portion of the software, you must retain all
-** copyright, patent, trademark, and attribution notices that are present in
-** the software.
-** (D) If you distribute any portion of the software in source code form, you
-** may do so only under this license by including a complete copy of this
-** license with your distribution. If you distribute any portion of the
-** software in compiled or object code form, you may only do so under a license
-** that complies with this license.
-** (E) The software is licensed "as-is." You bear the risk of using it. The
-** contributors give no express warranties, guarantees or conditions. You may
-** have additional consumer rights under your local laws which this license
-** cannot change. To the extent permitted under your local laws, the
-** contributors exclude the implied warranties of merchantability, fitness for
-** a particular purpose and non-infringement.
-**
-**==============================================================================
-*/
+/*
+**==============================================================================
+**
+** Microsoft Public License (Ms-PL)
+**
+** This license governs use of the accompanying software. If you use the
+** software, you accept this license. If you do not accept the license, do not
+** use the software.
+**
+** 1. Definitions
+** The terms "reproduce," "reproduction," "derivative works," and
+** "distribution" have the same meaning here as under U.S. copyright law.
+** A "contribution" is the original software, or any additions or changes to
+** the software.
+** A "contributor" is any person that distributes its contribution under this
+** license.
+** "Licensed patents" are a contributor's patent claims that read directly on
+** its contribution.
+**
+** 2. Grant of Rights
+** (A) Copyright Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
+** contribution, prepare derivative works of its contribution, and distribute
+** its contribution or any derivative works that you create.
+** (B) Patent Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free license under its licensed patents
+** to make, have made, use, sell, offer for sale, import, and/or otherwise
+** dispose of its contribution in the software or derivative works of the
+** contribution in the software.
+**
+** 3. Conditions and Limitations
+** (A) No Trademark License- This license does not grant you rights to use any
+** contributors' name, logo, or trademarks.
+** (B) If you bring a patent claim against any contributor over patents that
+** you claim are infringed by the software, your patent license from such
+** contributor to the software ends automatically.
+** (C) If you distribute any portion of the software, you must retain all
+** copyright, patent, trademark, and attribution notices that are present in
+** the software.
+** (D) If you distribute any portion of the software in source code form, you
+** may do so only under this license by including a complete copy of this
+** license with your distribution. If you distribute any portion of the
+** software in compiled or object code form, you may only do so under a license
+** that complies with this license.
+** (E) The software is licensed "as-is." You bear the risk of using it. The
+** contributors give no express warranties, guarantees or conditions. You may
+** have additional consumer rights under your local laws which this license
+** cannot change. To the extent permitted under your local laws, the
+** contributors exclude the implied warranties of merchantability, fitness for
+** a particular purpose and non-infringement.
+**
+**==============================================================================
+*/
/**
\file
@@ -140,7 +140,7 @@ namespace SCXCoreLib
bool IsLocked(void) const;
const std::wstring& GetName(void) const;
- const scxulong GetRefCount(void) const;
+ scxulong GetRefCount(void) const;
}; /* class SCXThreadLockHandle */
/*----------------------------------------------------------------------*/
@@ -205,7 +205,7 @@ namespace SCXCoreLib
SCXThreadLockHandle GetLock(void);
SCXThreadLockHandle GetLock(const std::wstring&);
- const unsigned int GetLocksUsed(void) const;
+ unsigned int GetLocksUsed(void) const;
protected:
void Reset(void);
diff --git a/source/code/include/scxproviderlib/predicate.h b/source/code/include/scxproviderlib/predicate.h
index 48b8685..7c4d031 100644
--- a/source/code/include/scxproviderlib/predicate.h
+++ b/source/code/include/scxproviderlib/predicate.h
@@ -1,58 +1,58 @@
-/*
-**==============================================================================
-**
-** Microsoft Public License (Ms-PL)
-**
-** This license governs use of the accompanying software. If you use the
-** software, you accept this license. If you do not accept the license, do not
-** use the software.
-**
-** 1. Definitions
-** The terms "reproduce," "reproduction," "derivative works," and
-** "distribution" have the same meaning here as under U.S. copyright law.
-** A "contribution" is the original software, or any additions or changes to
-** the software.
-** A "contributor" is any person that distributes its contribution under this
-** license.
-** "Licensed patents" are a contributor's patent claims that read directly on
-** its contribution.
-**
-** 2. Grant of Rights
-** (A) Copyright Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
-** contribution, prepare derivative works of its contribution, and distribute
-** its contribution or any derivative works that you create.
-** (B) Patent Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free license under its licensed patents
-** to make, have made, use, sell, offer for sale, import, and/or otherwise
-** dispose of its contribution in the software or derivative works of the
-** contribution in the software.
-**
-** 3. Conditions and Limitations
-** (A) No Trademark License- This license does not grant you rights to use any
-** contributors' name, logo, or trademarks.
-** (B) If you bring a patent claim against any contributor over patents that
-** you claim are infringed by the software, your patent license from such
-** contributor to the software ends automatically.
-** (C) If you distribute any portion of the software, you must retain all
-** copyright, patent, trademark, and attribution notices that are present in
-** the software.
-** (D) If you distribute any portion of the software in source code form, you
-** may do so only under this license by including a complete copy of this
-** license with your distribution. If you distribute any portion of the
-** software in compiled or object code form, you may only do so under a license
-** that complies with this license.
-** (E) The software is licensed "as-is." You bear the risk of using it. The
-** contributors give no express warranties, guarantees or conditions. You may
-** have additional consumer rights under your local laws which this license
-** cannot change. To the extent permitted under your local laws, the
-** contributors exclude the implied warranties of merchantability, fitness for
-** a particular purpose and non-infringement.
-**
-**==============================================================================
-*/
+/*
+**==============================================================================
+**
+** Microsoft Public License (Ms-PL)
+**
+** This license governs use of the accompanying software. If you use the
+** software, you accept this license. If you do not accept the license, do not
+** use the software.
+**
+** 1. Definitions
+** The terms "reproduce," "reproduction," "derivative works," and
+** "distribution" have the same meaning here as under U.S. copyright law.
+** A "contribution" is the original software, or any additions or changes to
+** the software.
+** A "contributor" is any person that distributes its contribution under this
+** license.
+** "Licensed patents" are a contributor's patent claims that read directly on
+** its contribution.
+**
+** 2. Grant of Rights
+** (A) Copyright Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
+** contribution, prepare derivative works of its contribution, and distribute
+** its contribution or any derivative works that you create.
+** (B) Patent Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free license under its licensed patents
+** to make, have made, use, sell, offer for sale, import, and/or otherwise
+** dispose of its contribution in the software or derivative works of the
+** contribution in the software.
+**
+** 3. Conditions and Limitations
+** (A) No Trademark License- This license does not grant you rights to use any
+** contributors' name, logo, or trademarks.
+** (B) If you bring a patent claim against any contributor over patents that
+** you claim are infringed by the software, your patent license from such
+** contributor to the software ends automatically.
+** (C) If you distribute any portion of the software, you must retain all
+** copyright, patent, trademark, and attribution notices that are present in
+** the software.
+** (D) If you distribute any portion of the software in source code form, you
+** may do so only under this license by including a complete copy of this
+** license with your distribution. If you distribute any portion of the
+** software in compiled or object code form, you may only do so under a license
+** that complies with this license.
+** (E) The software is licensed "as-is." You bear the risk of using it. The
+** contributors give no express warranties, guarantees or conditions. You may
+** have additional consumer rights under your local laws which this license
+** cannot change. To the extent permitted under your local laws, the
+** contributors exclude the implied warranties of merchantability, fitness for
+** a particular purpose and non-infringement.
+**
+**==============================================================================
+*/
/**
\file
@@ -64,86 +64,86 @@
*/
/*----------------------------------------------------------------------------*/
#ifndef PREDICATE_H
-#define PREDICATE_H
+#define PREDICATE_H
+
+//This header file is necessary because of CMPIPredOp which is an enum. We could define coresponding SCX enum to get rid of this if desired.
+#include "cmpidt.h"
+
+#include "scxproviderlib/scxproperty.h"
+#include "scxcorelib/stringaid.h"
+#include "scxcorelib/scxlog.h"
+
+namespace SCXProviderLib
+{
+ /*----------------------------------------------------------------------------*/
+ /**
+ * Predicate implements a WQL where clause Predicate. A Predicate is of the form "operand operator operand" such as name = "george"
+ *
+ */
+ class Predicate
+ {
+ public:
+ /*----------------------------------------------------------------------------*/
+ /**
+ * \fn Predicate::Predicate()
+ * \brief Ctor for Predicate that takes no parameter.
+ */
+ Predicate();
+ /*----------------------------------------------------------------------------*/
+ /**
+ * \fn Predicate::~Predicate()
+ * \brief Dtor for Predicate.
+ */
+ virtual ~Predicate(){};
+ /*----------------------------------------------------------------------------*/
+ /**
+ * \fn const CMPIPredOp GetOperation() const
+ * \brief Accessor for retrieving the operator of the predicate.
+ */
+ CMPIPredOp GetOperation() const { return this->op; };
+ /*----------------------------------------------------------------------------*/
+ /**
+ * \fn void SetOperation(const CMPIPredOp& o)
+ * \brief Modifier for the operator of the predicate.
+ * \param[in] o: The operator to set
+ */
+ void SetOperation(const CMPIPredOp& o) { this->op = o; };
+ /*----------------------------------------------------------------------------*/
+ /**
+ * \fn SCXProperty& GetLeftOperand()
+ * \brief Accessor for retrieving the left hand operand of the predicate.
+ * This method is not const because we need to set the returned SCXProperty
+ * Alternative would require redeclaring all the 7-8 "Set" methods for SCXProperty here
+ */
+ SCXProperty& GetLeftOperand() { return this->lhs; };
+ /*----------------------------------------------------------------------------*/
+ /**
+ * \fn SCXProperty& GetRightOperand()
+ * \brief Accessor for retrieving the right hand operand of the predicate.
+ */
+ SCXProperty& GetRightOperand() { return this->rhs; };
+ /*----------------------------------------------------------------------------*/
+ /**
+ * \fn std::wstring DumpString() const
+ * \brief Returns the string representation of the predicate.
+ *
+ * \returns The string representation.
+ */
+ std::wstring DumpString() const;
+ private:
+ /*----------------------------------------------------------------------------*/
+ /** The operator of the predicate. */
+ CMPIPredOp op;
+ /*----------------------------------------------------------------------------*/
+ /** The left hand operand of the predicate. */
+ SCXProperty lhs;
+ /*----------------------------------------------------------------------------*/
+ /** The right hand operand of the predicate. */
+ SCXProperty rhs;
+ /*----------------------------------------------------------------------------*/
+ /** Log handle. */
+ SCXCoreLib::SCXLogHandle m_log;
+ };
+}
-//This header file is necessary because of CMPIPredOp which is an enum. We could define coresponding SCX enum to get rid of this if desired.
-#include "cmpidt.h"
-
-#include "scxproviderlib/scxproperty.h"
-#include "scxcorelib/stringaid.h"
-#include "scxcorelib/scxlog.h"
-
-namespace SCXProviderLib
-{
- /*----------------------------------------------------------------------------*/
- /**
- * Predicate implements a WQL where clause Predicate. A Predicate is of the form "operand operator operand" such as name = "george"
- *
- */
- class Predicate
- {
- public:
- /*----------------------------------------------------------------------------*/
- /**
- * \fn Predicate::Predicate()
- * \brief Ctor for Predicate that takes no parameter.
- */
- Predicate();
- /*----------------------------------------------------------------------------*/
- /**
- * \fn Predicate::~Predicate()
- * \brief Dtor for Predicate.
- */
- virtual ~Predicate(){};
- /*----------------------------------------------------------------------------*/
- /**
- * \fn const CMPIPredOp GetOperation() const
- * \brief Accessor for retrieving the operator of the predicate.
- */
- const CMPIPredOp GetOperation() const { return this->op; };
- /*----------------------------------------------------------------------------*/
- /**
- * \fn void SetOperation(const CMPIPredOp& o)
- * \brief Modifier for the operator of the predicate.
- * \param[in] o: The operator to set
- */
- void SetOperation(const CMPIPredOp& o) { this->op = o; };
- /*----------------------------------------------------------------------------*/
- /**
- * \fn SCXProperty& GetLeftOperand()
- * \brief Accessor for retrieving the left hand operand of the predicate.
- * This method is not const because we need to set the returned SCXProperty
- * Alternative would require redeclaring all the 7-8 "Set" methods for SCXProperty here
- */
- SCXProperty& GetLeftOperand() { return this->lhs; };
- /*----------------------------------------------------------------------------*/
- /**
- * \fn SCXProperty& GetRightOperand()
- * \brief Accessor for retrieving the right hand operand of the predicate.
- */
- SCXProperty& GetRightOperand() { return this->rhs; };
- /*----------------------------------------------------------------------------*/
- /**
- * \fn std::wstring DumpString() const
- * \brief Returns the string representation of the predicate.
- *
- * \returns The string representation.
- */
- std::wstring DumpString() const;
- private:
- /*----------------------------------------------------------------------------*/
- /** The operator of the predicate. */
- CMPIPredOp op;
- /*----------------------------------------------------------------------------*/
- /** The left hand operand of the predicate. */
- SCXProperty lhs;
- /*----------------------------------------------------------------------------*/
- /** The right hand operand of the predicate. */
- SCXProperty rhs;
- /*----------------------------------------------------------------------------*/
- /** Log handle. */
- SCXCoreLib::SCXLogHandle m_log;
- };
-}
-
-#endif // PREDICATE_H
+#endif // PREDICATE_H
diff --git a/source/code/include/scxsystemlib/cpuinstance.h b/source/code/include/scxsystemlib/cpuinstance.h
index 5ffec2e..ccc238c 100644
--- a/source/code/include/scxsystemlib/cpuinstance.h
+++ b/source/code/include/scxsystemlib/cpuinstance.h
@@ -1,58 +1,58 @@
-/*
-**==============================================================================
-**
-** Microsoft Public License (Ms-PL)
-**
-** This license governs use of the accompanying software. If you use the
-** software, you accept this license. If you do not accept the license, do not
-** use the software.
-**
-** 1. Definitions
-** The terms "reproduce," "reproduction," "derivative works," and
-** "distribution" have the same meaning here as under U.S. copyright law.
-** A "contribution" is the original software, or any additions or changes to
-** the software.
-** A "contributor" is any person that distributes its contribution under this
-** license.
-** "Licensed patents" are a contributor's patent claims that read directly on
-** its contribution.
-**
-** 2. Grant of Rights
-** (A) Copyright Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
-** contribution, prepare derivative works of its contribution, and distribute
-** its contribution or any derivative works that you create.
-** (B) Patent Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free license under its licensed patents
-** to make, have made, use, sell, offer for sale, import, and/or otherwise
-** dispose of its contribution in the software or derivative works of the
-** contribution in the software.
-**
-** 3. Conditions and Limitations
-** (A) No Trademark License- This license does not grant you rights to use any
-** contributors' name, logo, or trademarks.
-** (B) If you bring a patent claim against any contributor over patents that
-** you claim are infringed by the software, your patent license from such
-** contributor to the software ends automatically.
-** (C) If you distribute any portion of the software, you must retain all
-** copyright, patent, trademark, and attribution notices that are present in
-** the software.
-** (D) If you distribute any portion of the software in source code form, you
-** may do so only under this license by including a complete copy of this
-** license with your distribution. If you distribute any portion of the
-** software in compiled or object code form, you may only do so under a license
-** that complies with this license.
-** (E) The software is licensed "as-is." You bear the risk of using it. The
-** contributors give no express warranties, guarantees or conditions. You may
-** have additional consumer rights under your local laws which this license
-** cannot change. To the extent permitted under your local laws, the
-** contributors exclude the implied warranties of merchantability, fitness for
-** a particular purpose and non-infringement.
-**
-**==============================================================================
-*/
+/*
+**==============================================================================
+**
+** Microsoft Public License (Ms-PL)
+**
+** This license governs use of the accompanying software. If you use the
+** software, you accept this license. If you do not accept the license, do not
+** use the software.
+**
+** 1. Definitions
+** The terms "reproduce," "reproduction," "derivative works," and
+** "distribution" have the same meaning here as under U.S. copyright law.
+** A "contribution" is the original software, or any additions or changes to
+** the software.
+** A "contributor" is any person that distributes its contribution under this
+** license.
+** "Licensed patents" are a contributor's patent claims that read directly on
+** its contribution.
+**
+** 2. Grant of Rights
+** (A) Copyright Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
+** contribution, prepare derivative works of its contribution, and distribute
+** its contribution or any derivative works that you create.
+** (B) Patent Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free license under its licensed patents
+** to make, have made, use, sell, offer for sale, import, and/or otherwise
+** dispose of its contribution in the software or derivative works of the
+** contribution in the software.
+**
+** 3. Conditions and Limitations
+** (A) No Trademark License- This license does not grant you rights to use any
+** contributors' name, logo, or trademarks.
+** (B) If you bring a patent claim against any contributor over patents that
+** you claim are infringed by the software, your patent license from such
+** contributor to the software ends automatically.
+** (C) If you distribute any portion of the software, you must retain all
+** copyright, patent, trademark, and attribution notices that are present in
+** the software.
+** (D) If you distribute any portion of the software in source code form, you
+** may do so only under this license by including a complete copy of this
+** license with your distribution. If you distribute any portion of the
+** software in compiled or object code form, you may only do so under a license
+** that complies with this license.
+** (E) The software is licensed "as-is." You bear the risk of using it. The
+** contributors give no express warranties, guarantees or conditions. You may
+** have additional consumer rights under your local laws which this license
+** cannot change. To the extent permitted under your local laws, the
+** contributors exclude the implied warranties of merchantability, fitness for
+** a particular purpose and non-infringement.
+**
+**==============================================================================
+*/
/**
\file
@@ -135,9 +135,9 @@ namespace SCXSystemLib
scxulong GetTotalLastTick() const;
private:
- const scxulong GetPercentageSafe(const scxulong tic_delta,
- const scxulong tot_delta,
- const bool inverse = false) const;
+ scxulong GetPercentageSafe(const scxulong tic_delta,
+ const scxulong tot_delta,
+ const bool inverse = false) const;
private:
diff --git a/source/code/include/scxsystemlib/scxvgcfg.h b/source/code/include/scxsystemlib/scxvgcfg.h
index 8a29935..28154ab 100644
--- a/source/code/include/scxsystemlib/scxvgcfg.h
+++ b/source/code/include/scxsystemlib/scxvgcfg.h
@@ -1,58 +1,58 @@
-/*
-**==============================================================================
-**
-** Microsoft Public License (Ms-PL)
-**
-** This license governs use of the accompanying software. If you use the
-** software, you accept this license. If you do not accept the license, do not
-** use the software.
-**
-** 1. Definitions
-** The terms "reproduce," "reproduction," "derivative works," and
-** "distribution" have the same meaning here as under U.S. copyright law.
-** A "contribution" is the original software, or any additions or changes to
-** the software.
-** A "contributor" is any person that distributes its contribution under this
-** license.
-** "Licensed patents" are a contributor's patent claims that read directly on
-** its contribution.
-**
-** 2. Grant of Rights
-** (A) Copyright Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
-** contribution, prepare derivative works of its contribution, and distribute
-** its contribution or any derivative works that you create.
-** (B) Patent Grant- Subject to the terms of this license, including the
-** license conditions and limitations in section 3, each contributor grants you
-** a non-exclusive, worldwide, royalty-free license under its licensed patents
-** to make, have made, use, sell, offer for sale, import, and/or otherwise
-** dispose of its contribution in the software or derivative works of the
-** contribution in the software.
-**
-** 3. Conditions and Limitations
-** (A) No Trademark License- This license does not grant you rights to use any
-** contributors' name, logo, or trademarks.
-** (B) If you bring a patent claim against any contributor over patents that
-** you claim are infringed by the software, your patent license from such
-** contributor to the software ends automatically.
-** (C) If you distribute any portion of the software, you must retain all
-** copyright, patent, trademark, and attribution notices that are present in
-** the software.
-** (D) If you distribute any portion of the software in source code form, you
-** may do so only under this license by including a complete copy of this
-** license with your distribution. If you distribute any portion of the
-** software in compiled or object code form, you may only do so under a license
-** that complies with this license.
-** (E) The software is licensed "as-is." You bear the risk of using it. The
-** contributors give no express warranties, guarantees or conditions. You may
-** have additional consumer rights under your local laws which this license
-** cannot change. To the extent permitted under your local laws, the
-** contributors exclude the implied warranties of merchantability, fitness for
-** a particular purpose and non-infringement.
-**
-**==============================================================================
-*/
+/*
+**==============================================================================
+**
+** Microsoft Public License (Ms-PL)
+**
+** This license governs use of the accompanying software. If you use the
+** software, you accept this license. If you do not accept the license, do not
+** use the software.
+**
+** 1. Definitions
+** The terms "reproduce," "reproduction," "derivative works," and
+** "distribution" have the same meaning here as under U.S. copyright law.
+** A "contribution" is the original software, or any additions or changes to
+** the software.
+** A "contributor" is any person that distributes its contribution under this
+** license.
+** "Licensed patents" are a contributor's patent claims that read directly on
+** its contribution.
+**
+** 2. Grant of Rights
+** (A) Copyright Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free copyright license to reproduce its
+** contribution, prepare derivative works of its contribution, and distribute
+** its contribution or any derivative works that you create.
+** (B) Patent Grant- Subject to the terms of this license, including the
+** license conditions and limitations in section 3, each contributor grants you
+** a non-exclusive, worldwide, royalty-free license under its licensed patents
+** to make, have made, use, sell, offer for sale, import, and/or otherwise
+** dispose of its contribution in the software or derivative works of the
+** contribution in the software.
+**
+** 3. Conditions and Limitations
+** (A) No Trademark License- This license does not grant you rights to use any
+** contributors' name, logo, or trademarks.
+** (B) If you bring a patent claim against any contributor over patents that
+** you claim are infringed by the software, your patent license from such
+** contributor to the software ends automatically.
+** (C) If you distribute any portion of the software, you must retain all
+** copyright, patent, trademark, and attribution notices that are present in
+** the software.
+** (D) If you distribute any portion of the software in source code form, you
+** may do so only under this license by including a complete copy of this
+** license with your distribution. If you distribute any portion of the
+** software in compiled or object code form, you may only do so under a license
+** that complies with this license.
+** (E) The software is licensed "as-is." You bear the risk of using it. The
+** contributors give no express warranties, guarantees or conditions. You may
+** have additional consumer rights under your local laws which this license
+** cannot change. To the extent permitted under your local laws, the
+** contributors exclude the implied warranties of merchantability, fitness for
+** a particular purpose and non-infringement.
+**
+**==============================================================================
+*/
/**
\file
@@ -153,7 +153,7 @@ namespace SCXSystemLib {
*/
const SCXVolumeGroupConfigurationItem& GetRoot() const { return m_root; }
- const size_t GetSeqNo() const;
+ size_t GetSeqNo() const;
void MapPartition(const std::wstring& partition, std::wstring& volumeGroup, std::wstring& logicalVolume) const;
static std::vector<std::wstring> FindPartitions(const std::wstring& volumeGroup, const std::wstring& logicalVolume);
--
1.7.9.2