Skip to content

Commit 9a3cb8f

Browse files
committed
Applied suggestions
1 parent 6ddd87f commit 9a3cb8f

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

.clang-tidy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Checks: '-*,modernize-use-nullptr,modernize-use-override,bugprone,modernize-redundant-void-arg'
1+
Checks: '-*,modernize-use-nullptr,modernize-use-override,bugprone,modernize-redundant-void-arg'

doc/htmldoc/static/js/11.1.0_highlight.min.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ className:"title",begin:u(t)+e.IDENT_RE,relevance:0
419419
},c=u(t)+e.IDENT_RE+"\\s*\\(",d={
420420
keyword:["asm","auto","break","case","const","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","static","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],
421421
type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","complex","bool","imaginary"],
422-
literal:"true false nullptr",
422+
literal:"true false NULL",
423423
built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"
424424
},g=[o,i,n,e.C_BLOCK_COMMENT_MODE,r,s],b={variants:[{begin:/=/,end:/;/},{
425425
begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],

doc/htmldoc/static/js/highlight.min.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ className:"title",begin:n.optional(a)+e.IDENT_RE,relevance:0
431431
},d=n.optional(a)+e.IDENT_RE+"\\s*\\(",g={
432432
keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],
433433
type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],
434-
literal:"true false nullptr",
434+
literal:"true false NULL",
435435
built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"
436436
},u=[l,r,t,e.C_BLOCK_COMMENT_MODE,o,s],b={variants:[{begin:/=/,end:/;/},{
437437
begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],

sli/slitype.h

-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ class SLIType
8686
SLIFunction*
8787
getaction() const
8888
{
89-
// assert(defaultaction);
90-
// If this fails, we have created a datum before the types were initialised.
9189
return defaultaction;
9290
}
9391
};

sli/token.h

-2
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,13 @@ class Token
373373
Datum*
374374
operator->() const
375375
{
376-
// assert(p!= nullptr);
377376
return p;
378377
}
379378

380379

381380
Datum&
382381
operator*() const
383382
{
384-
// assert(p);
385383
return *p;
386384
}
387385

sli/typechk.cc

+3-6
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ TypeTrie::getalternative( TypeTrie::TypeNode* pos, const Name& type )
167167
if ( pos->type == empty )
168168
{
169169
pos->type = type;
170-
// assert(not pos->next);
171170
return pos;
172171
}
173172

@@ -180,10 +179,8 @@ TypeTrie::getalternative( TypeTrie::TypeNode* pos, const Name& type )
180179

181180
if ( pos->type == sli::any )
182181
{
183-
// any must have been the tail and the previous
184-
// if must have added an extra Node, thus the following
185-
// assertion must hold:
186-
// assert(not pos->alt->alt);
182+
// When entering this if, the previous if added an extra Node,
183+
// thus pos->alt->alt will not be defined yet (nullptr)
187184

188185
TypeNode* new_tail = pos->alt;
189186

@@ -255,7 +252,7 @@ TypeTrie::insert_move( const TypeArray& a, Token& f )
255252
/* Error conditions:
256253
1. If pos->next!=NULL, the parameter list overlaps with
257254
an existing function definition.
258-
2. If pos->alt, something undefined must have happened.
255+
2. If pos->alt != nullptr, something undefined must have happened.
259256
This should be impossible.
260257
*/
261258
if ( not pos->next )

0 commit comments

Comments
 (0)