예제 #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;
}