Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gapii: Don't encode commands pre MEC #2213

Merged
merged 1 commit into from
Sep 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gapii/cc/call_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ inline PackEncoder::SPtr CallObserver::encoder() { return mEncoderStack.top(); }

template <typename T, typename /* = enable_if_encodable<T> */>
inline void CallObserver::enter(const T& obj) {
if (!mShouldTrace) {
return;
}
auto group = reinterpret_cast<PackEncoder*>(obj.encode(this, true));
GAPID_ASSERT_MSG(group != nullptr,
"encode() for group did not return sub-encoder");
Expand All @@ -304,6 +307,9 @@ inline void CallObserver::enter(const T& obj) {

template <typename T, typename /* = enable_if_encodable<T> */>
inline void CallObserver::encode(const T& obj) {
if (!mShouldTrace) {
return;
}
auto group = obj.encode(this, false);
GAPID_ASSERT_MSG(group == nullptr,
"encode() for non-group returned sub-encoder");
Expand Down