Ignore:
Timestamp:
Feb 17, 2009, 12:04:00 PM (15 years ago)
Author:
Christoph Mayer
Message:

-const char* mem leak gefixt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/system/SystemEventType.h

    r2432 r2433  
    4040#define SYSTEMEVENTTYPE_H_
    4141
    42 #include<iostream>
    43 #include<vector>
    44 #include<boost/cstdint.hpp>
     42#include <iostream>
     43#include <vector>
     44#include <string>
     45#include <boost/cstdint.hpp>
     46#include <boost/foreach.hpp>
    4547
     48using std::string;
    4649using std::vector;
    4750using std::ostream;
     
    6164        class Descriptor {
    6265        public:
    63                 const char* description;
     66                string description;
    6467                eventid_t parent;
    6568
    66                 Descriptor(const char* _d, eventid_t _p = 0) :
     69                Descriptor(string _d, eventid_t _p = 0) :
    6770                        description(_d), parent(_p) {
     71                }
     72               
     73                Descriptor(const Descriptor& rh)
     74                        : description( rh.description ), parent( rh.parent ) {
     75                }
     76
     77                ~Descriptor() {
    6878                }
    6979        };
     
    7585
    7686public:
    77         inline SystemEventType(const char* description,
     87        inline SystemEventType(string description,
    7888                        const SystemEventType parent = DEFAULT) {
    7989                if (ids.size() == 0) ids.push_back(Descriptor(
     
    94104
    95105        inline ~SystemEventType() {
    96 
    97106        }
    98107
    99         inline const char* getDescription() const {
     108        inline string getDescription() const {
    100109                return ids[id].description;
    101110        }
     
    147156
    148157        inline bool isDefault() {
    149                 return (id == 0);
     158                return ( id == 0 );
    150159        }
    151160
Note: See TracChangeset for help on using the changeset viewer.