未验证 提交 728e5820 编写于 作者: 石晓伟 提交者: GitHub

add clear_blocks interface for flatbuffers view, test=develop (#4363)

* add clear_blocks interface for flatbuffers view, test=develop

* fix a bug, test=develop
上级 3c9a1a1d
......@@ -79,6 +79,13 @@ class ProgramDescView : public ProgramDescAPI {
return desc_->version()->version();
}
void ClearBlocks() override {
CHECK_EQ(BlocksSize(), 0u) << "For backward compatibility, in the "
"read-only flatbuffers version, this "
"interface degenerates to force the number "
"of blocks to be zero.";
}
proto::ProgramDesc const* raw_desc() const { return desc_; }
const std::vector<char>& buf() const { return buf_; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册