mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 02:22:57 +01:00
changed Struct<int> operator[] index to int
This commit is contained in:
parent
905534af1c
commit
c617bbe551
@ -530,12 +530,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
Var& operator [] (std::size_t name)
|
||||
Var& operator [] (int name)
|
||||
{
|
||||
return _val[name];
|
||||
}
|
||||
|
||||
const Var& operator [] (std::size_t name) const
|
||||
const Var& operator [] (int name) const
|
||||
{
|
||||
return _val[name];
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ public:
|
||||
InvalidAccessException>("Not an array.")->operator[](n);
|
||||
else if (isStruct())
|
||||
return structIndexOperator(holderImpl<Struct<int>,
|
||||
InvalidAccessException>("Not a struct."), n);
|
||||
InvalidAccessException>("Not a struct."), static_cast<int>(n));
|
||||
else
|
||||
throw InvalidAccessException("Must be struct or array.");
|
||||
}
|
||||
@ -451,7 +451,7 @@ public:
|
||||
InvalidAccessException>("Not an array.")->operator[](n);
|
||||
else if (isStruct())
|
||||
return structIndexOperator(holderImpl<Struct<int>,
|
||||
InvalidAccessException>("Not a struct."), n);
|
||||
InvalidAccessException>("Not a struct."), static_cast<int>(n));
|
||||
else
|
||||
throw InvalidAccessException("Must be struct or array.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user