Skip to content

Commit

Permalink
Adding missing inline decls for
Browse files Browse the repository at this point in the history
- fully-specialized templated functions

- implemented functions in header files
  • Loading branch information
Byn Choi committed Jun 27, 2016
1 parent 7d7fca9 commit 1ad276f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions include/pcp-cpp/atom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pmAtomValue atom(const atom_type_type type, ValueType value)
* @return A `pmAtomValue` containing \c value of type \c type.
*/
template <>
pmAtomValue atom<char *>(const atom_type_type type, char * value)
inline pmAtomValue atom<char *>(const atom_type_type type, char * value)
{
pmAtomValue atom;
switch (type) {
Expand Down Expand Up @@ -102,7 +102,7 @@ pmAtomValue atom<char *>(const atom_type_type type, char * value)
* @return A `pmAtomValue` containing \c value of type \c type.
*/
template <>
pmAtomValue atom<pmValueBlock *>(const atom_type_type type, pmValueBlock * value)
inline pmAtomValue atom<pmValueBlock *>(const atom_type_type type, pmValueBlock * value)
{
pmAtomValue atom;
switch (type) {
Expand Down
28 changes: 14 additions & 14 deletions include/pcp-cpp/cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ lookup_result_type<Type> lookup(const pmInDom indom, const std::string &name,
*
* @see pmdaCacheOp
*/
int perform(const pmInDom indom, const int operation)
inline int perform(const pmInDom indom, const int operation)
{
const int result = pmdaCacheOp(indom, operation);
if (result < 0) {
Expand All @@ -229,7 +229,7 @@ int perform(const pmInDom indom, const int operation)
*
* @see pmdaCachePurge
*/
size_t purge(const pmInDom indom, const time_t recent)
inline size_t purge(const pmInDom indom, const time_t recent)
{
const int result = pmdaCachePurge(indom, recent);
if (result < 0) {
Expand All @@ -252,7 +252,7 @@ size_t purge(const pmInDom indom, const time_t recent)
*
* @see pmdaCachePurge
*/
size_t purge(const pmInDom indom, const boost::posix_time::time_duration &recent)
inline size_t purge(const pmInDom indom, const boost::posix_time::time_duration &recent)
{
return purge(indom, recent.total_seconds());
}
Expand All @@ -272,9 +272,9 @@ size_t purge(const pmInDom indom, const boost::posix_time::time_duration &recent
*
* @see pmdaCacheStore
*/
instance_id_type store(const pmInDom indom, const std::string &name,
const int flags = PMDA_CACHE_ADD,
void * const opaque = NULL)
inline instance_id_type store(const pmInDom indom, const std::string &name,
const int flags = PMDA_CACHE_ADD,
void * const opaque = NULL)
{
const int result = pmdaCacheStore(indom, flags, name.c_str(), opaque);
if (result < 0) {
Expand All @@ -297,8 +297,8 @@ instance_id_type store(const pmInDom indom, const std::string &name,
*
* @see pmdaCacheStore
*/
instance_id_type store(const pmInDom indom, const std::string &name,
void * const opaque, const int flags = PMDA_CACHE_ADD)
inline instance_id_type store(const pmInDom indom, const std::string &name,
void * const opaque, const int flags = PMDA_CACHE_ADD)
{
const int result = pmdaCacheStore(indom, flags, name.c_str(), opaque);
if (result < 0) {
Expand All @@ -323,9 +323,9 @@ instance_id_type store(const pmInDom indom, const std::string &name,
*
* @see pmdaCacheStoreKey
*/
instance_id_type store(const pmInDom indom, const std::string &name,
const std::string &key, const int flags = 0,
void * const opaque = NULL)
inline instance_id_type store(const pmInDom indom, const std::string &name,
const std::string &key, const int flags = 0,
void * const opaque = NULL)
{
const int result = pmdaCacheStoreKey(indom, flags, name.c_str(), key.size(),
key.c_str(), opaque);
Expand All @@ -351,9 +351,9 @@ instance_id_type store(const pmInDom indom, const std::string &name,
*
* @see pmdaCacheStoreKey
*/
instance_id_type store(const pmInDom indom, const std::string &name,
const std::string &key, void * const opaque,
const int flags = 0)
inline instance_id_type store(const pmInDom indom, const std::string &name,
const std::string &key, void * const opaque,
const int flags = 0)
{
const int result = pmdaCacheStoreKey(indom, flags, name.c_str(), key.size(),
key.c_str(), opaque);
Expand Down

0 comments on commit 1ad276f

Please sign in to comment.