Spec: Update functions based on std::vector

- This addresses a comment in KhronosGroup/glTF#1114
This commit is contained in:
Frank Galligan 2017-10-13 15:17:29 -07:00
parent e9e6ca6707
commit 75630a60fd
4 changed files with 10 additions and 8 deletions

View File

@ -84,8 +84,10 @@ specified to mean the same as doing both the individual assignments
represented using the notation `A == B` and is specified to mean the same as
`(A[ 0 ] == B[ 0 ] && A[ 1 ] == B[ 1 ])`. Inequality testing is defined as
`A != B` and is specified to mean the same as
`(A[ 0 ] != B[ 0 ] || A[ 1 ] != B[ 1 ])`. The functions `assign` and
`push_back` behave similarly on arrays as it is defined for c++ std::vector.
`(A[ 0 ] != B[ 0 ] || A[ 1 ] != B[ 1 ])`.
The functions `assign`, `back`, `pop_back`, `push_back`, and `size` behave
similarly on arrays as it is defined for c++ std::vector.
When a variable is said to be representable by a signed integer with `x` bits,
it means that the variable is greater than or equal to `-(1 << (x-1))`, and that

View File

@ -80,9 +80,9 @@ bool IsTopologySplit(encoder_symbol_id, out_face_edge,
out_encoder_split_symbol_id) {
if (source_symbol_id.back() != encoder_symbol_id)
return false;
*out_face_edge = source_edge_bit.pop();
*out_encoder_split_symbol_id = split_symbol_id.pop();
source_symbol_id.pop();
*out_face_edge = source_edge_bit.pop_back();
*out_encoder_split_symbol_id = split_symbol_id.pop_back();
source_symbol_id.pop_back();
return true;
}
~~~~~
@ -161,7 +161,7 @@ void NewActiveCornerReached(new_corner, symbol_id) {
break;
case TOPOLOGY_S:
{
corner_b = active_corner_stack.pop();
corner_b = active_corner_stack.pop_back();
for (i = 0; i < split_active_corners.size(); ++i) {
if (split_active_corners[i].decoder_split_symbol_id == symbol_id) {
active_corner_stack.push_back(split_active_corners[i].corner);

View File

@ -36,7 +36,7 @@ int ComputePriority(corner_id) {
int PopNextCornerToTraverse() {
for (i = best_priority_; i < kMaxPriority; ++i) {
if (!traversal_stacks_[i].empty()) {
ret = traversal_stacks_[i].pop();
ret = traversal_stacks_[i].pop_back();
best_priority_ = i;
return ret;
}

View File

@ -90,7 +90,7 @@ void MeshPredictionSchemeTexCoordsPortablePredictor_ComputePredictedValue(
temp_vec.push_back(-pn_uv[0]);
norm_squared = IntSqrt(cx_norm2_squared * pn_norm2_squared);
MultiplyScalar(temp_vec, norm_squared, &cx_uv);
orientation = pred_tex_coords_orientaitons[curr_att_dec][curr_att].pop();
orientation = pred_tex_coords_orientaitons[curr_att_dec][curr_att].pop_back();
if (orientation)
AddVectors(x_uv, cx_uv, &temp_vec);
else