Skip to content

Commit

Permalink
Make isscalar return bool
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Nov 15, 2013
1 parent 469c7bd commit 725c689
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions src/mtype.c
Expand Up @@ -1732,9 +1732,9 @@ bool Type::iscomplex()
return false;
}

int Type::isscalar()
bool Type::isscalar()
{
return FALSE;
return false;
}

bool Type::isunsigned()
Expand Down Expand Up @@ -3327,9 +3327,9 @@ bool TypeBasic::isunsigned()
return (flags & TFLAGSunsigned) != 0;
}

int TypeBasic::isscalar()
bool TypeBasic::isscalar()
{
return flags & (TFLAGSintegral | TFLAGSfloating);
return (flags & (TFLAGSintegral | TFLAGSfloating)) != 0;
}

MATCH TypeBasic::implicitConvTo(Type *to)
Expand Down Expand Up @@ -3566,7 +3566,7 @@ bool TypeVector::isunsigned()
return basetype->nextOf()->isunsigned();
}

int TypeVector::isscalar()
bool TypeVector::isscalar()
{
return basetype->nextOf()->isscalar();
}
Expand Down Expand Up @@ -5019,9 +5019,9 @@ MATCH TypePointer::constConv(Type *to)
return TypeNext::constConv(to);
}

int TypePointer::isscalar()
bool TypePointer::isscalar()
{
return TRUE;
return true;
}

Expression *TypePointer::defaultInit(Loc loc)
Expand Down Expand Up @@ -7515,7 +7515,7 @@ bool TypeEnum::isunsigned()
return sym->memtype->isunsigned();
}

int TypeEnum::isscalar()
bool TypeEnum::isscalar()
{
return sym->memtype->isscalar();
}
Expand Down Expand Up @@ -7738,7 +7738,7 @@ bool TypeTypedef::isunsigned()
return sym->basetype->isunsigned();
}

int TypeTypedef::isscalar()
bool TypeTypedef::isscalar()
{
return sym->basetype->isscalar();
}
Expand Down
12 changes: 6 additions & 6 deletions src/mtype.h
Expand Up @@ -257,7 +257,7 @@ class Type : public RootObject
virtual bool isreal();
virtual bool isimaginary();
virtual bool iscomplex();
virtual int isscalar();
virtual bool isscalar();
virtual bool isunsigned();
virtual int isscope();
virtual int isString();
Expand Down Expand Up @@ -410,7 +410,7 @@ class TypeBasic : public Type
bool isreal();
bool isimaginary();
bool iscomplex();
int isscalar();
bool isscalar();
bool isunsigned();
MATCH implicitConvTo(Type *to);
Expression *defaultInit(Loc loc);
Expand Down Expand Up @@ -446,7 +446,7 @@ class TypeVector : public Type
#endif
bool isintegral();
bool isfloating();
int isscalar();
bool isscalar();
bool isunsigned();
int checkBoolean();
MATCH implicitConvTo(Type *to);
Expand Down Expand Up @@ -596,7 +596,7 @@ class TypePointer : public TypeNext
void toJson(JsonOut *json);
MATCH implicitConvTo(Type *to);
MATCH constConv(Type *to);
int isscalar();
bool isscalar();
Expression *defaultInit(Loc loc);
int isZeroInit(Loc loc);
TypeInfoDeclaration *getTypeInfoDeclaration();
Expand Down Expand Up @@ -895,7 +895,7 @@ class TypeEnum : public Type
bool isreal();
bool isimaginary();
bool iscomplex();
int isscalar();
bool isscalar();
bool isunsigned();
int checkBoolean();
int isString();
Expand Down Expand Up @@ -943,7 +943,7 @@ class TypeTypedef : public Type
bool isreal();
bool isimaginary();
bool iscomplex();
int isscalar();
bool isscalar();
bool isunsigned();
int checkBoolean();
int isAssignable();
Expand Down

0 comments on commit 725c689

Please sign in to comment.