Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: core/fpdfdoc/cpvt_wordrange.h

Issue 2477443002: Remove FX_BOOL from core (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfdoc/cpvt_wordplace.h ('k') | core/fpdfdoc/csection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFDOC_CPVT_WORDRANGE_H_ 7 #ifndef CORE_FPDFDOC_CPVT_WORDRANGE_H_
8 #define CORE_FPDFDOC_CPVT_WORDRANGE_H_ 8 #define CORE_FPDFDOC_CPVT_WORDRANGE_H_
9 9
10 #include "core/fpdfdoc/cpvt_wordplace.h" 10 #include "core/fpdfdoc/cpvt_wordplace.h"
(...skipping 20 matching lines...) Expand all
31 void SetBeginPos(const CPVT_WordPlace& begin) { 31 void SetBeginPos(const CPVT_WordPlace& begin) {
32 BeginPos = begin; 32 BeginPos = begin;
33 SwapWordPlace(); 33 SwapWordPlace();
34 } 34 }
35 35
36 void SetEndPos(const CPVT_WordPlace& end) { 36 void SetEndPos(const CPVT_WordPlace& end) {
37 EndPos = end; 37 EndPos = end;
38 SwapWordPlace(); 38 SwapWordPlace();
39 } 39 }
40 40
41 FX_BOOL IsExist() const { return BeginPos != EndPos; } 41 bool IsExist() const { return BeginPos != EndPos; }
42 42
43 FX_BOOL operator!=(const CPVT_WordRange& wr) const { 43 bool operator!=(const CPVT_WordRange& wr) const {
44 return wr.BeginPos != BeginPos || wr.EndPos != EndPos; 44 return wr.BeginPos != BeginPos || wr.EndPos != EndPos;
45 } 45 }
46 46
47 void SwapWordPlace() { 47 void SwapWordPlace() {
48 if (BeginPos.WordCmp(EndPos) > 0) { 48 if (BeginPos.WordCmp(EndPos) > 0) {
49 CPVT_WordPlace place = EndPos; 49 CPVT_WordPlace place = EndPos;
50 EndPos = BeginPos; 50 EndPos = BeginPos;
51 BeginPos = place; 51 BeginPos = place;
52 } 52 }
53 } 53 }
54 54
55 CPVT_WordPlace BeginPos; 55 CPVT_WordPlace BeginPos;
56 CPVT_WordPlace EndPos; 56 CPVT_WordPlace EndPos;
57 }; 57 };
58 58
59 #endif // CORE_FPDFDOC_CPVT_WORDRANGE_H_ 59 #endif // CORE_FPDFDOC_CPVT_WORDRANGE_H_
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpvt_wordplace.h ('k') | core/fpdfdoc/csection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698