diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-06 09:37:59 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-06 13:47:18 +0000 |
commit | 3ef61c73a97b31000a21e323e04ad5397e517c4c (patch) | |
tree | 516534f41936adbf4eb2f1ba447508847ef98dac /core/fxcrt/fx_guid.cpp | |
parent | 555b31faa192c7a85c84979bea28d4914e93c784 (diff) | |
download | pdfium-3ef61c73a97b31000a21e323e04ad5397e517c4c.tar.xz |
GUID cleanup
This CL removes fx_guid and inlines into CXFA_FM2JSContext as needed.
Change-Id: I08a1f03fd4be46730eee24ab73b8b5c0daf9cd7d
Reviewed-on: https://pdfium-review.googlesource.com/13094
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_guid.cpp')
-rw-r--r-- | core/fxcrt/fx_guid.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/core/fxcrt/fx_guid.cpp b/core/fxcrt/fx_guid.cpp deleted file mode 100644 index 4d3a4e9a5f..0000000000 --- a/core/fxcrt/fx_guid.cpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2017 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "core/fxcrt/fx_guid.h" - -#include "core/fxcrt/fx_extension.h" -#include "core/fxcrt/fx_random.h" - -void FX_GUID_CreateV4(FX_GUID* pGUID) { - FX_Random_GenerateMT((uint32_t*)pGUID, 4); - uint8_t& b = ((uint8_t*)pGUID)[6]; - b = (b & 0x0F) | 0x40; -} - -CFX_ByteString FX_GUID_ToString(const FX_GUID* pGUID, bool bSeparator) { - CFX_ByteString bsStr; - char* pBuf = bsStr.GetBuffer(40); - for (int32_t i = 0; i < 16; i++) { - uint8_t b = reinterpret_cast<const uint8_t*>(pGUID)[i]; - FXSYS_IntToTwoHexChars(b, pBuf); - pBuf += 2; - if (bSeparator && (i == 3 || i == 5 || i == 7 || i == 9)) - *pBuf++ = L'-'; - } - bsStr.ReleaseBuffer(bSeparator ? 36 : 32); - return bsStr; -} |