Getting data from a hashtable

edited April 2013 in Native
I was wondering, is there an easier way to get data from a hashtable than what I'm currently doing?

[code2=cpp]ExitGames::Common::ValueObject<int64>* data = (ExitGames::Common::ValueObject<int64>*)roomprops.getValue("mybignumber");
int64 value = (int64)data->getDataCopy();[/code2]
I could make a helper function but I'm sure I'm doing this the long-winded(retarded) way ! :)


  • Hi.

    How about doing it this way:
    [code2=cpp]int64 value = ExitGames::Common::ValueObject<int64>(roomprops.getValue("mybignumber")).getDataCopy();[/code2]

    or this way:
    [code2=cpp]using ExitGames::Common::ValueObject; // assumes of course, that a name ValueObject inside the global namespace won't collide with something else in your code
    int64 value = ValueObject<int64>(roomprops.getValue("mybignumber")).getDataCopy();[/code2]
Sign In or Register to comment.