From c617bbe55182a469b6473c869c3706f97367640d Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Sun, 30 Nov 2008 04:06:10 +0000 Subject: [PATCH] changed Struct operator[] index to int --- Foundation/include/Poco/Dynamic/Struct.h | 4 ++-- Foundation/include/Poco/Dynamic/Var.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Foundation/include/Poco/Dynamic/Struct.h b/Foundation/include/Poco/Dynamic/Struct.h index 1f948d647..ebd6a5f47 100644 --- a/Foundation/include/Poco/Dynamic/Struct.h +++ b/Foundation/include/Poco/Dynamic/Struct.h @@ -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]; } diff --git a/Foundation/include/Poco/Dynamic/Var.h b/Foundation/include/Poco/Dynamic/Var.h index 290df9076..078cb74e7 100644 --- a/Foundation/include/Poco/Dynamic/Var.h +++ b/Foundation/include/Poco/Dynamic/Var.h @@ -436,7 +436,7 @@ public: InvalidAccessException>("Not an array.")->operator[](n); else if (isStruct()) return structIndexOperator(holderImpl, - InvalidAccessException>("Not a struct."), n); + InvalidAccessException>("Not a struct."), static_cast(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, - InvalidAccessException>("Not a struct."), n); + InvalidAccessException>("Not a struct."), static_cast(n)); else throw InvalidAccessException("Must be struct or array."); }