diff options
| author | Alexander Gavrilov | 2012-03-17 12:52:22 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-03-17 12:52:22 +0400 |
| commit | 58eb199036db3662ec2f7a2d6d301e7f432d5639 (patch) | |
| tree | c01d46ab4d403cd900ddbf6e0c31c22946c02a7c /library/RemoteTools.cpp | |
| parent | 14d6a62e1d212808623f1a71b3c559ac4a8dada3 (diff) | |
| download | dfhack-58eb199036db3662ec2f7a2d6d301e7f432d5639.tar.gz dfhack-58eb199036db3662ec2f7a2d6d301e7f432d5639.tar.bz2 dfhack-58eb199036db3662ec2f7a2d6d301e7f432d5639.tar.xz | |
Add many new template functions for enums & bitfields.
An incompatible change: ENUM_KEY_STR returns std::string now.
The old behavior is available via enum_item_key_str function.
Diffstat (limited to 'library/RemoteTools.cpp')
| -rw-r--r-- | library/RemoteTools.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/RemoteTools.cpp b/library/RemoteTools.cpp index a3e3c9e4..aa632435 100644 --- a/library/RemoteTools.cpp +++ b/library/RemoteTools.cpp @@ -61,6 +61,13 @@ using dfproto::CoreTextNotification; using dfproto::CoreTextFragment; using google::protobuf::MessageLite; +void DFHack::strVectorToRepeatedField(RepeatedPtrField<std::string> *pf, + const std::vector<std::string> &vec) +{ + for (size_t i = 0; i < vec.size(); ++i) + *pf->Add() = vec[i]; +} + CoreService::CoreService() { suspend_depth = 0; |
