prg_vector_find_and_remove_unordered()

摘要

从 vector 中移除一个由其地址指定的元素,且不保持其余元素的顺序。

语法

prg_vector_find_and_remove_unordered (vector_ptr, element_ptr)
参数 类型 说明
vector_ptr PrgT_Vector * 目标 vector
element_ptr void * 要移除的元素的地址

返回类型

PrgT_Compcode

若该元素的地址不在 vector 中则返回 PrgC_Compcode_Failure,否则返回 PrgC_Compcode_Success。

头文件

prg_vector.h

详情

行为与 prg_vector_remove_unordered() 相同,但调用者通过元素的地址(而不是位置索引)来指定要移除的元素。此函数会搜索 vector 以找到目标元素(注意此函数调用对性能的影响)。如果未找到该元素,则此调用不产生任何效果,并返回失败状态。

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com