示例#1
0
bool operator==(const ::google::protobuf::RepeatedField<T>& a, const ::google::protobuf::RepeatedField<T>& b) {
	if (a.size() != b.size())
		return false;
	for (auto aiter=a.begin(), biter=b.begin(); aiter != a.end(); aiter++, biter++ ) {
		if (*aiter != *biter)
			return false;
	}

	return true;
}
示例#2
0
文件: protobuf.hpp 项目: edwardt/loom
inline bool operator== (
        const google::protobuf::RepeatedField<T> & x,
        const google::protobuf::RepeatedField<T> & y)
{
    if (LOOM_UNLIKELY(x.size() != y.size())) {
        return false;
    }
    for (size_t i = 0, size = x.size(); i < size; ++i) {
        if (LOOM_UNLIKELY(x.Get(i) != y.Get(i))) {
            return false;
        }
    }
    return true;
}