Skip to content

Commit 3f0aa7c

Browse files
authored
Merge pull request #694 from tkruse/merge-leftovers
Bad Merge leftovers
2 parents dc0cf8b + ae9e7f0 commit 3f0aa7c

File tree

4 files changed

+10
-31
lines changed

4 files changed

+10
-31
lines changed

CppCoreGuidelines.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5464,7 +5464,7 @@ The compiler is more likely to get the default semantics right and you cannot im
54645464
Tracer& operator=(Tracer&&) = default;
54655465
};
54665466

5467-
Because we defined the destructor, we must define the copy and move operations. The `=default` is the best and simplest way of doing that.
5467+
Because we defined the destructor, we must define the copy and move operations. The `= default` is the best and simplest way of doing that.
54685468

54695469
##### Example, bad
54705470

@@ -7484,7 +7484,7 @@ The default is the easiest to read and write.
74847484

74857485
enum class Direction : char { n, s, e, w,
74867486
ne, nw, se, sw }; // underlying type saves space
7487-
7487+
74887488
enum class Web_color : int { red = 0xFF0000,
74897489
green = 0x00FF00,
74907490
blue = 0x0000FF }; // underlying type is redundant
@@ -12180,10 +12180,10 @@ Not all member functions can be called.
1218012180
##### Example
1218112181

1218212182
class Vector { // very simplified vector of doubles
12183-
// if elem!=nullptr then elem points to sz doubles
12183+
// if elem != nullptr then elem points to sz doubles
1218412184
public:
1218512185
Vector() : elem{nullptr}, sz{0}{}
12186-
vector(int s) : elem{new double},sz{s} { /* initialize elements */ }
12186+
vector(int s) : elem{new double}, sz{s} { /* initialize elements */ }
1218712187
~Vector() { delete elem; }
1218812188
double& operator[](int s) { return elem[s]; }
1218912189
// ...
@@ -16200,7 +16200,7 @@ Note that a C-style `(T)expression` cast means to perform the first of the follo
1620016200
};
1620116201

1620216202
Derived1 d1;
16203-
Base* p = &d1; // ok, implicit conversion to pointer to Base is fine
16203+
Base* p1 = &d1; // ok, implicit conversion to pointer to Base is fine
1620416204

1620516205
// BAD, tries to treat d1 as a Derived2, which it is not
1620616206
Derived2* p2 = (Derived2*)(p);

scripts/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ show-diff: nodejs/node_modules/remark nodejs/package.json $(SOURCEPATH) $(BUILD_
5555
.PHONY: check-references
5656
check-references: $(SOURCEPATH) $(BUILD_DIR) Makefile
5757
## check references unique
58-
<<<<<<< HEAD
5958
@rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
60-
@grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
61-
=======
62-
rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
6359
@grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | sort | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
64-
>>>>>>> 70d056f087b45f22bda925c9657eec5eaf7a45bf
6560
## check if output has data
6661
@if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi
6762

scripts/hunspell/isocpp.dic

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ derived1
120120
derived2
121121
destructors
122122
Destructors
123-
detatch
123+
detach
124124
Dewhurst
125125
Dewhurst03
126126
disambiguator
@@ -135,6 +135,7 @@ enum
135135
Enum
136136
enums
137137
eq
138+
eqdefault
138139
EqualityComparable
139140
errno
140141
expr
@@ -491,7 +492,8 @@ typesafe
491492
UB
492493
unaliased
493494
uncompromised
494-
unenforcable
495+
undetached
496+
unenforceable
495497
uninit
496498
uniqueptrparam
497499
unnamed2

scripts/python/md-split.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,30 +93,17 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
9393
if comment_idx >= 0:
9494
no_comment_line = line[:comment_idx]
9595
text_filehandle.write(line[comment_idx + 2:])
96-
<<<<<<< HEAD
97-
9896
if (not has_actual_code
9997
and not line.strip().startswith('//')
10098
and not line.strip().startswith('???')
101-
and not line.strip() ==''):
99+
and not line.strip() == ''):
102100
has_actual_code = True
103-
=======
104-
if (not has_actual_code
105-
and not line.strip().startswith('//')
106-
and not line.strip().startswith('???')
107-
and not line.strip() == ''):
108-
has_actual_code = True
109-
>>>>>>> 180cd89a1f3105a20e79b81964b4d388dca94040
110101
else:
111102
# write empty line so line numbers stay stable
112103
text_filehandle.write('\n')
113104

114105
if (not line.strip() == '```'):
115-
<<<<<<< HEAD
116106
if ('???' == no_comment_line or '...' == no_comment_line):
117-
=======
118-
if ('???' in no_comment_line or '...' in no_comment_line):
119-
>>>>>>> 180cd89a1f3105a20e79b81964b4d388dca94040
120107
has_question_marks = True
121108
linebuffer.append(dedent(line) if not fenced else line)
122109
try:
@@ -127,12 +114,7 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
127114
break
128115
codefile = os.path.join(codedir, '%s%s.cpp' % (name, index))
129116
if fenced:
130-
<<<<<<< HEAD
131-
text_filehandle.write('')
132-
=======
133117
text_filehandle.write('\n')
134-
135-
>>>>>>> 180cd89a1f3105a20e79b81964b4d388dca94040
136118
if (has_actual_code and not has_question_marks):
137119
# add commonly used headers, so that lines can compile
138120
with io.open(codefile, 'w') as code_filehandle:

0 commit comments

Comments
 (0)