Merge pull request #694 from tkruse/merge-leftovers

Bad Merge leftovers
This commit is contained in:
Andrew Pardoe 2016-08-22 18:00:04 -07:00 committed by GitHub
commit 3f0aa7c379
4 changed files with 10 additions and 31 deletions

View File

@ -5464,7 +5464,7 @@ The compiler is more likely to get the default semantics right and you cannot im
Tracer& operator=(Tracer&&) = default; Tracer& operator=(Tracer&&) = default;
}; };
Because we defined the destructor, we must define the copy and move operations. The `=default` is the best and simplest way of doing that. Because we defined the destructor, we must define the copy and move operations. The `= default` is the best and simplest way of doing that.
##### Example, bad ##### Example, bad
@ -12180,10 +12180,10 @@ Not all member functions can be called.
##### Example ##### Example
class Vector { // very simplified vector of doubles class Vector { // very simplified vector of doubles
// if elem!=nullptr then elem points to sz doubles // if elem != nullptr then elem points to sz doubles
public: public:
Vector() : elem{nullptr}, sz{0}{} Vector() : elem{nullptr}, sz{0}{}
vector(int s) : elem{new double},sz{s} { /* initialize elements */ } vector(int s) : elem{new double}, sz{s} { /* initialize elements */ }
~Vector() { delete elem; } ~Vector() { delete elem; }
double& operator[](int s) { return elem[s]; } double& operator[](int s) { return elem[s]; }
// ... // ...
@ -16200,7 +16200,7 @@ Note that a C-style `(T)expression` cast means to perform the first of the follo
}; };
Derived1 d1; Derived1 d1;
Base* p = &d1; // ok, implicit conversion to pointer to Base is fine Base* p1 = &d1; // ok, implicit conversion to pointer to Base is fine
// BAD, tries to treat d1 as a Derived2, which it is not // BAD, tries to treat d1 as a Derived2, which it is not
Derived2* p2 = (Derived2*)(p); Derived2* p2 = (Derived2*)(p);

View File

@ -55,13 +55,8 @@ show-diff: nodejs/node_modules/remark nodejs/package.json $(SOURCEPATH) $(BUILD_
.PHONY: check-references .PHONY: check-references
check-references: $(SOURCEPATH) $(BUILD_DIR) Makefile check-references: $(SOURCEPATH) $(BUILD_DIR) Makefile
## check references unique ## check references unique
<<<<<<< HEAD
@rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq @rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
@grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
=======
rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
@grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | sort | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq @grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | sort | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
>>>>>>> 70d056f087b45f22bda925c9657eec5eaf7a45bf
## check if output has data ## check if output has data
@if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi @if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi

View File

@ -120,7 +120,7 @@ derived1
derived2 derived2
destructors destructors
Destructors Destructors
detatch detach
Dewhurst Dewhurst
Dewhurst03 Dewhurst03
disambiguator disambiguator
@ -135,6 +135,7 @@ enum
Enum Enum
enums enums
eq eq
eqdefault
EqualityComparable EqualityComparable
errno errno
expr expr
@ -491,7 +492,8 @@ typesafe
UB UB
unaliased unaliased
uncompromised uncompromised
unenforcable undetached
unenforceable
uninit uninit
uniqueptrparam uniqueptrparam
unnamed2 unnamed2

View File

@ -93,30 +93,17 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
if comment_idx >= 0: if comment_idx >= 0:
no_comment_line = line[:comment_idx] no_comment_line = line[:comment_idx]
text_filehandle.write(line[comment_idx + 2:]) text_filehandle.write(line[comment_idx + 2:])
<<<<<<< HEAD
if (not has_actual_code
and not line.strip().startswith('//')
and not line.strip().startswith('???')
and not line.strip() ==''):
has_actual_code = True
=======
if (not has_actual_code if (not has_actual_code
and not line.strip().startswith('//') and not line.strip().startswith('//')
and not line.strip().startswith('???') and not line.strip().startswith('???')
and not line.strip() == ''): and not line.strip() == ''):
has_actual_code = True has_actual_code = True
>>>>>>> 180cd89a1f3105a20e79b81964b4d388dca94040
else: else:
# write empty line so line numbers stay stable # write empty line so line numbers stay stable
text_filehandle.write('\n') text_filehandle.write('\n')
if (not line.strip() == '```'): if (not line.strip() == '```'):
<<<<<<< HEAD
if ('???' == no_comment_line or '...' == no_comment_line): if ('???' == no_comment_line or '...' == no_comment_line):
=======
if ('???' in no_comment_line or '...' in no_comment_line):
>>>>>>> 180cd89a1f3105a20e79b81964b4d388dca94040
has_question_marks = True has_question_marks = True
linebuffer.append(dedent(line) if not fenced else line) linebuffer.append(dedent(line) if not fenced else line)
try: try:
@ -127,12 +114,7 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
break break
codefile = os.path.join(codedir, '%s%s.cpp' % (name, index)) codefile = os.path.join(codedir, '%s%s.cpp' % (name, index))
if fenced: if fenced:
<<<<<<< HEAD
text_filehandle.write('')
=======
text_filehandle.write('\n') text_filehandle.write('\n')
>>>>>>> 180cd89a1f3105a20e79b81964b4d388dca94040
if (has_actual_code and not has_question_marks): if (has_actual_code and not has_question_marks):
# add commonly used headers, so that lines can compile # add commonly used headers, so that lines can compile
with io.open(codefile, 'w') as code_filehandle: with io.open(codefile, 'w') as code_filehandle: