here is my code, should I directly usage vector<IndexVector> ?
    std::vector<std::unique_ptr<IndexVector>> ret; // IndexVector is a 
protobuf message type, sizeof ... = 72

    while (result.next()) {
        std::unique_ptr<IndexVector> indexVector 
{std::make_unique<IndexVector>()};
        int64_t poiId = result.getLLong(1);
        int64_t pictureId = result.getLLong(2);
        bool isDel = result.getInt(3) != 0;

        indexVector->set_id(pictureId);
        indexVector->set_poiid(poiId);
        indexVector->set_isdel(isDel);

        ret.push_back(indexVector);
    }
    return ret;

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/ba2870b6-c2ac-4d3c-89b6-4ea8f2cfcba4n%40googlegroups.com.

Reply via email to