Skip to content

Commit 552d836

Browse files
author
Dilawar Singh
committed
Merge branch 'macos'
2 parents 3dd9eca + 084645a commit 552d836

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

basecode/ElementValueFinfo.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef _ELEMENT_VALUE_FINFO_H
1010
#define _ELEMENT_VALUE_FINFO_H
1111

12+
#include <cctype>
13+
1214
/**
1315
* This variant of ValueFinfo provides facilities to set and get
1416
* values of fields that require information about the managing Element
@@ -27,14 +29,14 @@ template < class T, class F > class ElementValueFinfo: public ValueFinfoBase
2729
: ValueFinfoBase( name, doc )
2830
{
2931
string setname = "set" + name;
30-
setname[3] = toupper( setname[3] );
32+
setname[3] = std::toupper( setname[3] );
3133
set_ = new DestFinfo(
3234
setname,
3335
"Assigns field value.",
3436
new EpFunc1< T, F >( setFunc ) );
3537

3638
string getname = "get" + name;
37-
getname[3] = toupper( getname[3] );
39+
getname[3] = std::toupper( getname[3] );
3840
get_ = new DestFinfo(
3941
getname,
4042
"Requests field value. The requesting Element must "
@@ -79,7 +81,7 @@ template < class T, class F > class ReadOnlyElementValueFinfo: public ValueFinfo
7981
: ValueFinfoBase( name, doc )
8082
{
8183
string getname = "get" + name;
82-
getname[3] = toupper( getname[3] );
84+
getname[3] = std::toupper( getname[3] );
8385
get_ = new DestFinfo(
8486
getname,
8587
"Requests field value. The requesting Element must "

basecode/LookupElementValueFinfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ template < class T, class L, class F > class LookupElementValueFinfo: public Loo
3030
: LookupValueFinfoBase( name, doc )
3131
{
3232
string setname = "set" + name;
33-
setname[3] = toupper( setname[3] );
33+
setname[3] = std::toupper( setname[3] );
3434
set_ = new DestFinfo(
3535
setname,
3636
"Assigns field value.",
3737
new EpFunc2< T, L, F >( setFunc ) );
3838

3939
string getname = "get" + name;
40-
getname[3] = toupper( getname[3] );
40+
getname[3] = std::toupper( getname[3] );
4141
get_ = new DestFinfo(
4242
getname,
4343
"Requests field value. The requesting Element must "
@@ -90,7 +90,7 @@ template < class T, class L, class F >
9090
: LookupValueFinfoBase( name, doc )
9191
{
9292
string getname = "get" + name;
93-
getname[3] = toupper( getname[3] );
93+
getname[3] = std::toupper( getname[3] );
9494
get_ = new DestFinfo(
9595
getname,
9696
"Requests field value. The requesting Element must "

basecode/SetGet.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ template< class T, class A >
3030
A localGet( const Eref& er, string field )
3131
{
3232
string fullFieldName = "get" + field;
33-
fullFieldName[3] = toupper( fullFieldName[3] );
33+
fullFieldName[3] = std::toupper( fullFieldName[3] );
3434
const Finfo* finfo = er.element()->cinfo()->findFinfo( fullFieldName );
3535
assert( finfo );
3636

@@ -245,23 +245,23 @@ template< class A > class Field: public SetGet1< A >
245245
static bool set( const ObjId& dest, const string& field, A arg )
246246
{
247247
string temp = "set" + field;
248-
temp[3] = toupper( temp[3] );
248+
temp[3] = std::toupper( temp[3] );
249249
return SetGet1< A >::set( dest, temp, arg );
250250
}
251251

252252
static bool setVec( ObjId destId, const string& field,
253253
const vector< A >& arg )
254254
{
255255
string temp = "set" + field;
256-
temp[3] = toupper( temp[3] );
256+
temp[3] = std::toupper( temp[3] );
257257
return SetGet1< A >::setVec( destId, temp, arg );
258258
}
259259

260260
static bool setRepeat( ObjId destId, const string& field,
261261
A arg )
262262
{
263263
string temp = "set" + field;
264-
temp[3] = toupper( temp[3] );
264+
temp[3] = std::toupper( temp[3] );
265265
return SetGet1< A >::setRepeat( destId, temp, arg );
266266
}
267267

@@ -286,7 +286,7 @@ template< class A > class Field: public SetGet1< A >
286286
ObjId tgt( dest );
287287
FuncId fid;
288288
string fullFieldName = "get" + field;
289-
fullFieldName[3] = toupper( fullFieldName[3] );
289+
fullFieldName[3] = std::toupper( fullFieldName[3] );
290290
const OpFunc* func = SetGet::checkSet( fullFieldName, tgt, fid );
291291
const GetOpFuncBase< A >* gof =
292292
dynamic_cast< const GetOpFuncBase< A >* >( func );
@@ -321,7 +321,7 @@ template< class A > class Field: public SetGet1< A >
321321
ObjId tgt( dest );
322322
FuncId fid;
323323
string fullFieldName = "get" + field;
324-
fullFieldName[3] = toupper( fullFieldName[3] );
324+
fullFieldName[3] = std::toupper( fullFieldName[3] );
325325
const OpFunc* func = SetGet::checkSet( fullFieldName, tgt, fid );
326326
const GetOpFuncBase< A >* gof =
327327
dynamic_cast< const GetOpFuncBase< A >* >( func );
@@ -468,7 +468,7 @@ template< class L, class A > class LookupField: public SetGet2< L, A >
468468
L index, A arg )
469469
{
470470
string temp = "set" + field;
471-
temp[3] = toupper( temp[3] );
471+
temp[3] = std::toupper( temp[3] );
472472
return SetGet2< L, A >::set( dest, temp, index, arg );
473473
}
474474

@@ -480,7 +480,7 @@ template< class L, class A > class LookupField: public SetGet2< L, A >
480480
const vector< L >& index, const vector< A >& arg )
481481
{
482482
string temp = "set" + field;
483-
temp[3] = toupper( temp[3] );
483+
temp[3] = std::toupper( temp[3] );
484484
return SetGet2< L, A >::setVec( destId, temp, index, arg );
485485
}
486486

@@ -494,7 +494,7 @@ template< class L, class A > class LookupField: public SetGet2< L, A >
494494
const vector< L >& index, const vector< A >& arg )
495495
{
496496
string temp = "set" + field;
497-
temp[3] = toupper( temp[3] );
497+
temp[3] = std::toupper( temp[3] );
498498
return SetGet2< L, A >::setVec( dest, temp, index, arg );
499499
}
500500

@@ -534,7 +534,7 @@ template< class L, class A > class LookupField: public SetGet2< L, A >
534534
ObjId tgt( dest );
535535
FuncId fid;
536536
string fullFieldName = "get" + field;
537-
fullFieldName[3] = toupper( fullFieldName[3] );
537+
fullFieldName[3] = std::toupper( fullFieldName[3] );
538538
const OpFunc* func = SetGet::checkSet( fullFieldName, tgt, fid);
539539
const LookupGetOpFuncBase< L, A >* gof =
540540
dynamic_cast< const LookupGetOpFuncBase< L, A >* >( func );
@@ -577,7 +577,7 @@ template< class L, class A > class LookupField: public SetGet2< L, A >
577577
ObjId tgt( dest );
578578
FuncId fid;
579579
string fullFieldName = "get" + field;
580-
fullFieldName[3] = toupper( fullFieldName[3] );
580+
fullFieldName[3] = std::toupper( fullFieldName[3] );
581581
const OpFunc* func = SetGet::checkSet( fullFieldName, tgt, fid );
582582
const LookupGetOpFuncBase< L, A >* gof =
583583
dynamic_cast< const LookupGetOpFuncBase< L, A >* >( func );

pymoose/mfield.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ extern "C" {
512512
RAISE_INVALID_ID(NULL, "moose_ElementField_getNum");
513513
}
514514
string name = self->name;
515-
name[0] = toupper( name[0] );
515+
name[0] = std::toupper( name[0] );
516516
unsigned int num = Field<unsigned int>::get(self->myoid, "numField");
517517
return Py_BuildValue("I", num);
518518
}

0 commit comments

Comments
 (0)