[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Condor-devel] Patches to remove "using namespace std" from header files
- Date: Wed, 11 Jul 2012 11:46:32 +0200
- From: Florian Weimer <fweimer@xxxxxxxxxx>
- Subject: [Condor-devel] Patches to remove "using namespace std" from header files
These patches remove "using namespace std" from header files and add
explicit qualifications with "std::" where necessary.
--
Florian Weimer / Red Hat Product Security Team
>From f543773df34a690d5b6182af98ec5465423dcfd8 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@xxxxxxxxxx>
Date: Tue, 10 Jul 2012 13:24:29 +0200
Subject: [PATCH 1/6] src/condor_dagman/job.h: remove using namespace std
---
src/condor_dagman/job.cpp | 12 ++++++------
src/condor_dagman/job.h | 6 ++----
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/condor_dagman/job.cpp b/src/condor_dagman/job.cpp
index c984e4d..5cb012f 100644
--- a/src/condor_dagman/job.cpp
+++ b/src/condor_dagman/job.cpp
@@ -245,7 +245,7 @@ void Job::Dump ( const Dag *dag ) const {
for (int i = 0 ; i < 3 ; i++) {
dprintf( D_ALWAYS, "%15s: ", queue_t_names[i] );
- set<JobID_t>::const_iterator qit;
+ std::set<JobID_t>::const_iterator qit;
for (qit = _queues[i].begin(); qit != _queues[i].end(); qit++) {
Job *node = dag->Dag::FindNodeByNodeID( *qit );
dprintf( D_ALWAYS | D_NOHEADER, "%s, ", node->GetJobName() );
@@ -482,7 +482,7 @@ Job::TerminateFailure()
bool
Job::Add( const queue_t queue, const JobID_t jobID )
{
- pair<set<JobID_t>::iterator, bool> ret;
+ std::pair<std::set<JobID_t>::iterator, bool> ret;
ret = _queues[queue].insert(jobID);
@@ -580,7 +580,7 @@ Job::GetStatusName() const
bool
Job::HasChild( Job* child ) {
JobID_t cid;
- set<JobID_t>::iterator it;
+ std::set<JobID_t>::iterator it;
if( !child ) {
return false;
@@ -599,7 +599,7 @@ Job::HasChild( Job* child ) {
bool
Job::HasParent( Job* parent ) {
JobID_t pid;
- set<JobID_t>::iterator it;
+ std::set<JobID_t>::iterator it;
if( !parent ) {
return false;
@@ -1014,8 +1014,8 @@ Job::GetPreSkip() const
void
Job::FixPriority(Dag& dag)
{
- set<JobID_t> parents = GetQueueRef(Q_PARENTS);
- for(set<JobID_t>::iterator p = parents.begin(); p != parents.end(); ++p){
+ std::set<JobID_t> parents = GetQueueRef(Q_PARENTS);
+ for(std::set<JobID_t>::iterator p = parents.begin(); p != parents.end(); ++p){
Job* parent = dag.FindNodeByNodeID(*p);
if( parent->_hasNodePriority ) {
// Nothing to do if parent priority is small
diff --git a/src/condor_dagman/job.h b/src/condor_dagman/job.h
index 1615c79..a6cad3e 100644
--- a/src/condor_dagman/job.h
+++ b/src/condor_dagman/job.h
@@ -32,8 +32,6 @@
#include "CondorError.h"
#include <set>
-using namespace std;
-
class ThrottleByCategory;
class Dag;
@@ -193,7 +191,7 @@ class Job {
Script * _scriptPost;
///
- inline set<JobID_t> & GetQueueRef (const queue_t queue) {
+ inline std::set<JobID_t> & GetQueueRef (const queue_t queue) {
return _queues[queue];
}
@@ -542,7 +540,7 @@ private:
waiting -> Jobs on which the current Job is waiting for output
*/
- set<JobID_t> _queues[3];
+ std::set<JobID_t> _queues[3];
/* The ID of this job. This serves as a primary key for Jobs, where each
Job's ID is unique from all the rest
--
1.7.7.6
>From 19d2456626a2415f27efece45443598cabb0c44b Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@xxxxxxxxxx>
Date: Tue, 10 Jul 2012 13:27:30 +0200
Subject: [PATCH 2/6] src/condor_includes/condor_cron_job_list.h: remove using
namespace std
---
src/condor_includes/condor_cron_job_list.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/condor_includes/condor_cron_job_list.h b/src/condor_includes/condor_cron_job_list.h
index 7b0992c..5b5ffe7 100644
--- a/src/condor_includes/condor_cron_job_list.h
+++ b/src/condor_includes/condor_cron_job_list.h
@@ -24,7 +24,6 @@
#include "condor_daemon_core.h"
#include <list>
#include "condor_cron_job.h"
-using namespace std;
// Define a simple class to run child tasks periodically.
class CronJobMgr;
@@ -58,7 +57,7 @@ class CondorCronJobList
void DeleteUnmarked( void );
private:
- list<CronJob *> m_job_list;
+ std::list<CronJob *> m_job_list;
CronJobMgr &m_mgr; // My manager
};
--
1.7.7.6
>From 03ee224ba3db77005fa0b809441d9d71bebe9358 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@xxxxxxxxxx>
Date: Tue, 10 Jul 2012 13:31:46 +0200
Subject: [PATCH 3/6] src/condor_includes/named_classad_list.h: remove using
namespace std
---
src/condor_includes/named_classad_list.h | 3 +--
src/condor_submit.V6/submit.cpp | 26 +++++++++++++-------------
src/condor_utils/named_classad_list.cpp | 8 ++++----
3 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/src/condor_includes/named_classad_list.h b/src/condor_includes/named_classad_list.h
index e9b12e1..46e94cb 100644
--- a/src/condor_includes/named_classad_list.h
+++ b/src/condor_includes/named_classad_list.h
@@ -24,7 +24,6 @@
#include "condor_classad.h"
#include "named_classad.h"
#include <list>
-using namespace std;
class NamedClassAdList
{
@@ -46,7 +45,7 @@ class NamedClassAdList
int Publish( ClassAd *ad );
protected:
- list<NamedClassAd*> m_ads;
+ std::list<NamedClassAd*> m_ads;
};
diff --git a/src/condor_submit.V6/submit.cpp b/src/condor_submit.V6/submit.cpp
index 6efd4aa..76bbabf 100644
--- a/src/condor_submit.V6/submit.cpp
+++ b/src/condor_submit.V6/submit.cpp
@@ -242,8 +242,8 @@ const char *MemoryUsage = "memory_usage";
const char *RequestCpus = "request_cpus";
const char *RequestMemory = "request_memory";
const char *RequestDisk = "request_disk";
-const string RequestPrefix = "request_";
-std::set<string> fixedReqRes;
+const std::string RequestPrefix = "request_";
+std::set<std::string> fixedReqRes;
const char *Universe = "universe";
const char *MachineCount = "machine_count";
@@ -2508,21 +2508,21 @@ void SetFileOptions()
void SetRequestResources() {
HASHITER it = hash_iter_begin(ProcVars, PROCVARSIZE);
for (; !hash_iter_done(it); hash_iter_next(it)) {
- string key = hash_iter_key(it);
+ std::string key = hash_iter_key(it);
std::transform(key.begin(), key.end(), key.begin(), ::tolower);
// if key is not of form "request_xxx", ignore it:
if (key.compare(0, RequestPrefix.length(), RequestPrefix) != 0) continue;
// if key is one of the predefined request_cpus, request_memory, etc, also ignore it,
// those have their own special handling:
if (fixedReqRes.count(key) > 0) continue;
- string rname = key.substr(RequestPrefix.length());
+ std::string rname = key.substr(RequestPrefix.length());
// resource name should be nonempty
if (rname.size() <= 0) continue;
// CamelCase it!
*(rname.begin()) = toupper(*(rname.begin()));
// could get this from 'it', but this prevents unused-line warnings:
- string val = condor_param(key.c_str());
- string assign;
+ std::string val = condor_param(key.c_str());
+ std::string assign;
sprintf(assign, "%s%s = %s", ATTR_REQUEST_PREFIX, rname.c_str(), val.c_str());
InsertJobExpr(assign.c_str());
}
@@ -5520,14 +5520,14 @@ SetGridParams()
}
hash_iter_delete(&it);
- stringstream ss;
+ std::stringstream ss;
char *tagName;
tagNames.rewind();
while ((tagName = tagNames.next())) {
// XXX: Check that tagName does not contain an equal sign (=)
- string tag;
- string tagAttr(ATTR_EC2_TAG_PREFIX); tagAttr.append(tagName);
- string tagCmd("ec2_tag_"); tagCmd.append(tagName);
+ std::string tag;
+ std::string tagAttr(ATTR_EC2_TAG_PREFIX); tagAttr.append(tagName);
+ std::string tagCmd("ec2_tag_"); tagCmd.append(tagName);
char *value = NULL;
if ((value = condor_param(tagCmd.c_str(), tagAttr.c_str()))) {
buffer.sprintf("%s = \"%s\"", tagAttr.c_str(), value);
@@ -6812,19 +6812,19 @@ check_requirements( char const *orig, MyString &answer )
// identify any custom pslot resource reqs and add them in:
HASHITER it = hash_iter_begin(ProcVars, PROCVARSIZE);
for (; !hash_iter_done(it); hash_iter_next(it)) {
- string key = hash_iter_key(it);
+ std::string key = hash_iter_key(it);
std::transform(key.begin(), key.end(), key.begin(), ::tolower);
// if key is not of form "request_xxx", ignore it:
if (key.compare(0, RequestPrefix.length(), RequestPrefix) != 0) continue;
// if key is one of the predefined request_cpus, request_memory, etc, also ignore it,
// those have their own special handling:
if (fixedReqRes.count(key) > 0) continue;
- string rname = key.substr(RequestPrefix.length());
+ std::string rname = key.substr(RequestPrefix.length());
// resource name should be nonempty
if (rname.size() <= 0) continue;
// CamelCase it!
*(rname.begin()) = toupper(*(rname.begin()));
- string clause;
+ std::string clause;
sprintf(clause, " && (TARGET.%s%s >= %s%s)", "", rname.c_str(), ATTR_REQUEST_PREFIX, rname.c_str());
answer += clause;
}
diff --git a/src/condor_utils/named_classad_list.cpp b/src/condor_utils/named_classad_list.cpp
index 8099d04..d292d59 100644
--- a/src/condor_utils/named_classad_list.cpp
+++ b/src/condor_utils/named_classad_list.cpp
@@ -33,7 +33,7 @@ NamedClassAdList::NamedClassAdList( void )
NamedClassAdList::~NamedClassAdList( void )
{
- list<NamedClassAd *>::iterator iter;
+ std::list<NamedClassAd *>::iterator iter;
for( iter = m_ads.begin(); iter != m_ads.end(); iter++ ) {
delete *iter;
}
@@ -43,7 +43,7 @@ NamedClassAdList::~NamedClassAdList( void )
NamedClassAd *
NamedClassAdList::Find( const char *name )
{
- list<NamedClassAd *>::iterator iter;
+ std::list<NamedClassAd *>::iterator iter;
for( iter = m_ads.begin(); iter != m_ads.end(); iter++ ) {
NamedClassAd *nad = *iter;
if ( ! strcmp( nad->GetName( ), name ) ) {
@@ -125,7 +125,7 @@ NamedClassAdList::Replace( const char *name, ClassAd *newAd,
int
NamedClassAdList::Delete( const char *name )
{
- list<NamedClassAd *>::iterator iter;
+ std::list<NamedClassAd *>::iterator iter;
for( iter = m_ads.begin(); iter != m_ads.end(); iter++ ) {
NamedClassAd *ad = *iter;
if ( ! strcmp( ad->GetName( ), name ) ) {
@@ -142,7 +142,7 @@ NamedClassAdList::Delete( const char *name )
int
NamedClassAdList::Publish( ClassAd *merged_ad )
{
- list<NamedClassAd *>::iterator iter;
+ std::list<NamedClassAd *>::iterator iter;
for( iter = m_ads.begin(); iter != m_ads.end(); iter++ ) {
NamedClassAd *nad = *iter;
ClassAd *ad = nad->GetAd( );
--
1.7.7.6
>From 7be8e24db51eac26549080a2ecf5b7ff1890bc0f Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@xxxxxxxxxx>
Date: Tue, 10 Jul 2012 13:39:01 +0200
Subject: [PATCH 4/6] src/condor_negotiator.V6/matchmaker.h: remove using
namespace std
---
src/condor_negotiator.V6/Accountant.cpp | 8 ++++----
src/condor_negotiator.V6/matchmaker.cpp | 26 +++++++++++++-------------
src/condor_negotiator.V6/matchmaker.h | 2 --
3 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/src/condor_negotiator.V6/Accountant.cpp b/src/condor_negotiator.V6/Accountant.cpp
index 72a3622..d15f65d 100644
--- a/src/condor_negotiator.V6/Accountant.cpp
+++ b/src/condor_negotiator.V6/Accountant.cpp
@@ -112,7 +112,7 @@ void Accountant::Initialize(GroupEntry* root_group)
hgq_root_group = root_group;
hgq_submitter_group_map.clear();
// Pre-set mapping from all defined group names to themselves.
- deque<GroupEntry*> grpq;
+ std::deque<GroupEntry*> grpq;
grpq.push_back(hgq_root_group);
while (!grpq.empty()) {
GroupEntry* group = grpq.front();
@@ -1065,7 +1065,7 @@ ClassAd* Accountant::ReportState(bool rollup) {
// assign acct group index numbers first, breadth first ordering
int EntryNum=1;
map<string, int> gnmap;
- deque<GroupEntry*> grpq;
+ std::deque<GroupEntry*> grpq;
grpq.push_back(hgq_root_group);
while (!grpq.empty()) {
GroupEntry* group = grpq.front();
@@ -1291,13 +1291,13 @@ void Accountant::ReportGroups(GroupEntry* group, ClassAd* ad, bool rollup, map<s
ad->LookupInteger(tmp.c_str(), BeginUsageTime);
sprintf(tmp, "BeginUsageTime%d", pnum);
ad->LookupInteger(tmp.c_str(), ival);
- ad->Assign(tmp.c_str(), min(ival, BeginUsageTime));
+ ad->Assign(tmp.c_str(), std::min(ival, BeginUsageTime));
sprintf(tmp, "LastUsageTime%d", gnum);
ad->LookupInteger(tmp.c_str(), LastUsageTime);
sprintf(tmp, "LastUsageTime%d", pnum);
ad->LookupInteger(tmp.c_str(), ival);
- ad->Assign(tmp.c_str(), max(ival, LastUsageTime));
+ ad->Assign(tmp.c_str(), std::max(ival, LastUsageTime));
}
diff --git a/src/condor_negotiator.V6/matchmaker.cpp b/src/condor_negotiator.V6/matchmaker.cpp
index d9ffaef..c0367e2 100644
--- a/src/condor_negotiator.V6/matchmaker.cpp
+++ b/src/condor_negotiator.V6/matchmaker.cpp
@@ -1445,7 +1445,7 @@ negotiationTime ()
if (group->allocated > 0) served_groups += 1;
else if (group->requested > 0) unserved_groups += 1;
double target = (accept_surplus) ? group->allocated : group->quota;
- maxdelta = max(maxdelta, max(0.0, target - group->usage));
+ maxdelta = std::max(maxdelta, std::max(0.0, target - group->usage));
}
dprintf(D_ALWAYS, "group quotas: groups= %lu requesting= %lu served= %lu unserved= %lu slots= %g requested= %g allocated= %g surplus= %g\n",
@@ -1493,7 +1493,7 @@ negotiationTime ()
while (true) {
// Up our fraction of the full deltas. Note that maxdelta may be zero, but we still
// want to negotiate at least once regardless, so loop halting check is at the end.
- n = min(n+ninc, maxdelta);
+ n = std::min(n+ninc, maxdelta);
dprintf(D_FULLDEBUG, "group quotas: entering RR iteration n= %g\n", n);
// Do the negotiations
@@ -1522,12 +1522,12 @@ negotiationTime ()
// if allocating surplus, use allocated, otherwise just use the group's quota directly
double target = (accept_surplus) ? group->allocated : group->quota;
- double delta = max(0.0, target - group->usage);
+ double delta = std::max(0.0, target - group->usage);
// If delta > 0, we know maxdelta also > 0. Otherwise, it means we actually are using more than
// we just got allocated, so just negotiate for what we were allocated.
double slots = (delta > 0) ? group->usage + (delta * (n / maxdelta)) : target;
// Defensive -- do not exceed allocated slots
- slots = min(slots, target);
+ slots = std::min(slots, target);
if (!accountant.UsingWeightedSlots()) {
slots = floor(slots);
}
@@ -1560,7 +1560,7 @@ negotiationTime ()
dprintf(D_FULLDEBUG, "group quotas: Group %s allocated= %g usage= %g\n", group->name.c_str(), group->allocated, group->usage);
// I do not want to give credit for usage above what was allocated here.
- usage_total += min(group->usage, group->allocated);
+ usage_total += std::min(group->usage, group->allocated);
if (group->usage < group->allocated) {
// If we failed to match all the allocated slots for any reason, then take what we
@@ -1754,7 +1754,7 @@ void Matchmaker::hgq_construct_tree() {
// With the tree structure in place, we can make a list of groups in breadth-first order
// For more convenient iteration over the structure
hgq_groups.clear();
- deque<GroupEntry*> grpq;
+ std::deque<GroupEntry*> grpq;
grpq.push_back(hgq_root_group);
while (!grpq.empty()) {
GroupEntry* group = grpq.front();
@@ -1808,10 +1808,10 @@ void Matchmaker::hgq_assign_quotas(GroupEntry* group, double quota) {
// static quotas get first dibs on any available quota
// total static quota assignable is bounded by quota coming from above
- double sqa = (allow_quota_oversub) ? sqsum : min(sqsum, quota);
+ double sqa = (allow_quota_oversub) ? sqsum : std::min(sqsum, quota);
// children with dynamic quotas get allocated from the remainder
- double dqa = max(0.0, quota - sqa);
+ double dqa = std::max(0.0, quota - sqa);
dprintf(D_FULLDEBUG, "group quotas: group %s, allocated %g for static children, %g for dynamic children\n", group->name.c_str(), sqa, dqa);
@@ -1820,7 +1820,7 @@ void Matchmaker::hgq_assign_quotas(GroupEntry* group, double quota) {
double Zs = (sqsum > 0) ? sqsum : 1;
// If dqsum exceeds 1, then dynamic quota values get scaled so that they sum to 1
- double Zd = max(dqsum, double(1));
+ double Zd = std::max(dqsum, double(1));
// quota assigned to all children
double chq = 0;
@@ -1854,7 +1854,7 @@ double Matchmaker::hgq_fairshare(GroupEntry* group) {
group->name.c_str(), group->quota, group->requested);
// Allocate whichever is smallest: the requested slots or group quota.
- group->allocated = min(group->requested, group->quota);
+ group->allocated = std::min(group->requested, group->quota);
// update requested values
group->requested -= group->allocated;
@@ -2079,7 +2079,7 @@ double Matchmaker::hgq_recover_remainders(GroupEntry* group) {
if (child->accept_surplus) {
group->subtree_requested += child->subtree_requested;
if (child->subtree_requested > 0)
- group->subtree_rr_time = min(group->subtree_rr_time, child->subtree_rr_time);
+ group->subtree_rr_time = std::min(group->subtree_rr_time, child->subtree_rr_time);
}
}
@@ -2153,7 +2153,7 @@ double Matchmaker::hgq_round_robin(GroupEntry* group, double surplus) {
while ((surplus >= 1) && (requested > 0)) {
// max we can fairly allocate per group this round:
- double amax = max(double(1), floor(surplus / outstanding));
+ double amax = std::max(double(1), floor(surplus / outstanding));
dprintf(D_FULLDEBUG, "group quotas: round-robin (2): pass: surplus= %g requested= %g outstanding= %g amax= %g\n",
surplus, requested, outstanding, amax);
@@ -2164,7 +2164,7 @@ double Matchmaker::hgq_round_robin(GroupEntry* group, double surplus) {
unsigned long j = idx[jj];
GroupEntry* grp = groups[j];
if (grp->accept_surplus && (subtree_requested[j] > 0)) {
- double a = min(subtree_requested[j], amax);
+ double a = std::min(subtree_requested[j], amax);
allocated[j] += a;
subtree_requested[j] -= a;
sumalloc += a;
diff --git a/src/condor_negotiator.V6/matchmaker.h b/src/condor_negotiator.V6/matchmaker.h
index 644db4e..acdf541 100644
--- a/src/condor_negotiator.V6/matchmaker.h
+++ b/src/condor_negotiator.V6/matchmaker.h
@@ -33,8 +33,6 @@
#include <map>
#include <algorithm>
-using namespace std;
-
/* FILESQL include */
#include "file_sql.h"
--
1.7.7.6
>From f4ac11faf518c61e5cb7a0ef4fb19bd3348e7646 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@xxxxxxxxxx>
Date: Tue, 10 Jul 2012 13:41:34 +0200
Subject: [PATCH 5/6] src/condor_startd.V6/startd_cron_job_params.h: remove
using namespace std
---
src/condor_startd.V6/ResAttributes.cpp | 2 +-
src/condor_startd.V6/Starter.cpp | 2 +-
src/condor_startd.V6/startd_cron_job_params.h | 3 +--
src/condor_startd.V6/startd_named_classad_list.cpp | 2 +-
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/condor_startd.V6/ResAttributes.cpp b/src/condor_startd.V6/ResAttributes.cpp
index 8bbe049..0c045d7 100644
--- a/src/condor_startd.V6/ResAttributes.cpp
+++ b/src/condor_startd.V6/ResAttributes.cpp
@@ -552,7 +552,7 @@ void MachAttributes::init_machine_resources() {
const string invprefix = "INVENTORY_";
const string restr = prefix + "(.+)";
ASSERT(re.compile(restr.c_str(), &pszMsg, &err, PCRE_CASELESS));
- vector<string> resdef;
+ std::vector<std::string> resdef;
const int n = param_names_matching(re, resdef);
for (int j = 0; j < n; ++j) {
string rname = resdef[j].substr(prefix.length());
diff --git a/src/condor_startd.V6/Starter.cpp b/src/condor_startd.V6/Starter.cpp
index 921c0ae..5e2cfbb 100644
--- a/src/condor_startd.V6/Starter.cpp
+++ b/src/condor_startd.V6/Starter.cpp
@@ -1320,7 +1320,7 @@ Starter::startKillTimer( void )
// we keep trying.
s_kill_tid =
daemonCore->Register_Timer( tmp_killing_timeout,
- max(1,tmp_killing_timeout),
+ std::max(1,tmp_killing_timeout),
(TimerHandlercpp)&Starter::sigkillStarter,
"sigkillStarter", this );
if( s_kill_tid < 0 ) {
diff --git a/src/condor_startd.V6/startd_cron_job_params.h b/src/condor_startd.V6/startd_cron_job_params.h
index 6eb0575..cb6b11c 100644
--- a/src/condor_startd.V6/startd_cron_job_params.h
+++ b/src/condor_startd.V6/startd_cron_job_params.h
@@ -22,7 +22,6 @@
#include "classad_cron_job.h"
#include <list>
-using namespace std;
// Define a "ClassAd" cron job parameter object
class StartdCronJobParams : public ClassAdCronJobParams
@@ -37,7 +36,7 @@ class StartdCronJobParams : public ClassAdCronJobParams
bool InSlotList( unsigned slot ) const;
private:
- list<unsigned> m_slots;
+ std::list<unsigned> m_slots;
};
#endif /* _STARTD_CRON_JOB_PARAMS_H */
diff --git a/src/condor_startd.V6/startd_named_classad_list.cpp b/src/condor_startd.V6/startd_named_classad_list.cpp
index 070d937..6b105e1 100644
--- a/src/condor_startd.V6/startd_named_classad_list.cpp
+++ b/src/condor_startd.V6/startd_named_classad_list.cpp
@@ -42,7 +42,7 @@ StartdNamedClassAdList::Register( StartdNamedClassAd *ad )
int
StartdNamedClassAdList::Publish( ClassAd *merged_ad, unsigned r_id )
{
- list<NamedClassAd *>::iterator iter;
+ std::list<NamedClassAd *>::iterator iter;
for( iter = m_ads.begin(); iter != m_ads.end(); iter++ ) {
NamedClassAd *nad = *iter;
StartdNamedClassAd *sad = dynamic_cast<StartdNamedClassAd*>(nad);
--
1.7.7.6
>From cfc9aaab9fb7ad857c121ecc0372484d5e34b20b Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@xxxxxxxxxx>
Date: Tue, 10 Jul 2012 13:42:52 +0200
Subject: [PATCH 6/6] src/condor_utils/classad_oldnew.h: remove using
namespace std
---
src/condor_utils/classad_oldnew.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/condor_utils/classad_oldnew.h b/src/condor_utils/classad_oldnew.h
index 1b950ba..ad39d74 100644
--- a/src/condor_utils/classad_oldnew.h
+++ b/src/condor_utils/classad_oldnew.h
@@ -31,8 +31,6 @@
#include "classad/matchClassad.h"
-using namespace std;
-
void AttrList_setPublishServerTimeMangled( bool publish);
classad::ClassAd* getOldClassAd( Stream *sock );
--
1.7.7.6