浏览代码

findKey returns success in found parameter

Henning Koehler 7 年之前
父节点
当前提交
04925314f8
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Global.h

+ 6 - 0
Global.h

@@ -376,8 +376,14 @@ namespace vstd
 		for(auto iter = map.cbegin(); iter != map.cend(); iter++)
 		{
 			if(iter->second == value)
+			{
+				if(found)
+					*found = true;
 				return iter->first;
+			}
 		}
+		if(found)
+			*found = false;
 		return Key();
 	}