mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
add F_operator flag
This commit is contained in:
parent
52e4acc0ce
commit
5b1ea47fee
@ -35,6 +35,7 @@ public:
|
||||
F_destructor = 0x08,
|
||||
F_method_pointer = 0x10,
|
||||
F_unary_op = 0x20,
|
||||
F_operator = 0x40,
|
||||
};
|
||||
|
||||
CPPFunctionType(CPPType *return_type, CPPParameterList *parameters,
|
||||
|
@ -134,12 +134,16 @@ add_func_modifier(CPPParameterList *params, int flags) {
|
||||
// is really a unary operator, so set the unary_op flag. Operators
|
||||
// () and [] are never considered unary operators.
|
||||
if (_ident != NULL &&
|
||||
_ident->get_simple_name().substr(0, 9) == "operator " &&
|
||||
_ident->get_simple_name() != string("operator ()") &&
|
||||
_ident->get_simple_name() != string("operator []")) {
|
||||
if (params->_parameters.empty()) {
|
||||
flags |= CPPFunctionType::F_unary_op;
|
||||
_ident->get_simple_name().substr(0, 9) == "operator ") {
|
||||
|
||||
if (_ident->get_simple_name() != string("operator ()") &&
|
||||
_ident->get_simple_name() != string("operator []")) {
|
||||
if (params->_parameters.empty()) {
|
||||
flags |= CPPFunctionType::F_unary_op;
|
||||
}
|
||||
}
|
||||
|
||||
flags |= CPPFunctionType::F_operator;
|
||||
}
|
||||
|
||||
_modifiers.push_back(Modifier::func_type(params, flags));
|
||||
|
Loading…
x
Reference in New Issue
Block a user