From 746c28772e01675096800d8853aae33f94ed3d55 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 7 Apr 2017 16:35:13 -0700 Subject: Create initializer-list ctor for strings. Also use safe arithmetic for two-arg ctor. Change-Id: I5d541d9b2d5fe5b939f4cc8c22cf034f5cb01176 Reviewed-on: https://pdfium-review.googlesource.com/3955 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fxcrt/cfx_bytestring.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/fxcrt/cfx_bytestring.h') diff --git a/core/fxcrt/cfx_bytestring.h b/core/fxcrt/cfx_bytestring.h index 9596fc5eee..b9ebd8a83c 100644 --- a/core/fxcrt/cfx_bytestring.h +++ b/core/fxcrt/cfx_bytestring.h @@ -8,6 +8,7 @@ #define CORE_FXCRT_CFX_BYTESTRING_H_ #include +#include #include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/cfx_string_c_template.h" @@ -38,6 +39,7 @@ class CFX_ByteString { explicit CFX_ByteString(const CFX_ByteStringC& bstrc); CFX_ByteString(const CFX_ByteStringC& bstrc1, const CFX_ByteStringC& bstrc2); + CFX_ByteString(const std::initializer_list& list); ~CFX_ByteString(); -- cgit v1.2.3