DtMmdb: replace ostring with std::string.
This commit is contained in:
@@ -62,7 +62,7 @@ debug(cerr, y -> v_name);
|
||||
*/
|
||||
|
||||
|
||||
return ( x -> v_name.string_LS(y -> v_name) );
|
||||
return ( x -> v_name.compare(y -> v_name) < 0);
|
||||
}
|
||||
|
||||
Boolean name_oid_eq(const void* o1, const void* o2)
|
||||
@@ -75,7 +75,7 @@ MESSAGE(cerr, "in name_oid_eq");
|
||||
debug(cerr, x -> v_name);
|
||||
debug(cerr, y -> v_name);
|
||||
*/
|
||||
return ( x -> v_name.string_EQ(y -> v_name) );
|
||||
return ( x -> v_name.compare(y -> v_name) == 0);
|
||||
}
|
||||
|
||||
Boolean oid_ls(const void* o1, const void* o2)
|
||||
@@ -145,15 +145,14 @@ void delete_name_oid_rec_f(const void* name_oid_ptr)
|
||||
//
|
||||
// ***************************************************
|
||||
|
||||
mark_t::mark_t(char* marks) : ostring(strlen(marks))
|
||||
mark_t::mark_t(char* marks) : string(marks)
|
||||
{
|
||||
set(marks);
|
||||
}
|
||||
|
||||
istream& operator >>(istream& in, mark_t& m)
|
||||
{
|
||||
char c ;
|
||||
char* ptr = m.get();
|
||||
const char* ptr = m.c_str();
|
||||
Boolean read_marks = false;
|
||||
|
||||
while ( in && in.get(c) ) {
|
||||
@@ -175,7 +174,7 @@ istream& operator >>(istream& in, mark_t& m)
|
||||
|
||||
ostream& operator <<(ostream& out, mark_t& m)
|
||||
{
|
||||
out << m.get();
|
||||
out << m.c_str();
|
||||
return out ;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
#define _misc_h
|
||||
|
||||
#include "object/root.h"
|
||||
#include "utility/ostring.h"
|
||||
#include "storage/abs_storage.h"
|
||||
#include "object/handler.h"
|
||||
|
||||
@@ -71,25 +70,25 @@ class name_oid_t
|
||||
public:
|
||||
name_oid_t(const char* nm, abs_storage* store = 0) : v_store(store)
|
||||
{
|
||||
v_name.set(nm);
|
||||
v_name.assign(nm);
|
||||
}
|
||||
name_oid_t(const char* nm, const oid_t& id, abs_storage* store = 0) :
|
||||
v_oid(id), v_store(store)
|
||||
{
|
||||
v_name.set(nm);
|
||||
v_name.assign(nm);
|
||||
};
|
||||
|
||||
~name_oid_t() {};
|
||||
|
||||
public:
|
||||
ostring v_name;
|
||||
string v_name;
|
||||
oid_t v_oid;
|
||||
abs_storage* v_store;
|
||||
};
|
||||
|
||||
void delete_name_oid_rec_f(const void* name_oid_ptr);
|
||||
|
||||
class mark_t : private ostring
|
||||
class mark_t : private string
|
||||
{
|
||||
public:
|
||||
mark_t(char* marks = (char*)"\t\n ");
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* CDE - Common Desktop Environment
|
||||
*
|
||||
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
||||
*
|
||||
* These libraries and programs are free software; you can
|
||||
* redistribute them and/or modify them under the terms of the GNU
|
||||
* Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* These libraries and programs are distributed in the hope that
|
||||
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with these libraries and programs; if not, write
|
||||
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
* Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
/* $XConsortium: name_oid_t.h /main/3 1996/06/11 17:22:59 cde-hal $ */
|
||||
class name_oid_t {
|
||||
|
||||
public:
|
||||
ostring name;
|
||||
oid_t v_oid;
|
||||
|
||||
name_oid_t(const char* nm, oid_t& id) : v_oid(id) {
|
||||
name.set(nm);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user