Fix random doubled spaces in code

This commit is contained in:
Olly Betts 2023-11-17 09:49:36 +13:00
parent 714cd79f11
commit 3ce0174a0c
23 changed files with 27 additions and 27 deletions

View File

@ -1091,7 +1091,7 @@ static void process_args(int argc, char **argv)
}
*p = 0;
}
else {
else {
int len = p - default_depfile_name;
p = x_malloc(len + 3);

View File

@ -7,7 +7,7 @@ c = new example.intSum();
// Use the objects. They should be callable just like a normal
// javascript function.
for (i=1;i<=100;i++) {
for (i=1;i<=100;i++) {
a.call(i); // Note: function call
b.call(Math.sqrt(i)); // Note: function call
c.call(i);

View File

@ -31,7 +31,7 @@ template<typename T> class Queue {
last = (last + 1) % maxsize;
nitems++;
}
T dequeue() {
T dequeue() {
T x;
if (nitems == 0) throw EmptyError();
x = items[(last + maxsize - nitems) % maxsize];

View File

@ -31,7 +31,7 @@ template<typename T> class Queue {
last = (last + 1) % maxsize;
nitems++;
}
T dequeue() {
T dequeue() {
T x;
if (nitems == 0) throw EmptyError();
x = items[(last + maxsize - nitems) % maxsize];

View File

@ -57,15 +57,15 @@ char* test_a(char hello[8],
return hi;
}
char* test_b(name a, const namea b) {
char* test_b(name a, const namea b) {
return a;
}
int test_a(int a) {
int test_a(int a) {
return a;
}
int test_b(int a) {
int test_b(int a) {
return a;
}

View File

@ -11,12 +11,12 @@
// First way of operating.
template< bool B > struct algorithm {
template< class T1, class T2 > static int do_it(T1 &, T2 &) { /*...*/ return 1; }
template< class T1, class T2 > static int do_it(T1 &, T2 &) { /*...*/ return 1; }
};
// Second way of operating.
template<> struct algorithm<true> {
template< class T1, class T2 > static int do_it(T1, T2) { /*...*/ return 2; }
template< class T1, class T2 > static int do_it(T1, T2) { /*...*/ return 2; }
};
// Instantiating 'elaborate' will automatically instantiate the correct way to operate, depending on the types used.

View File

@ -73,7 +73,7 @@ extern "C" {
Foo() : val(0) {
}
virtual ~Foo() {
virtual ~Foo() {
}
void stop() {

View File

@ -128,7 +128,7 @@
throw ep;
} else if (i == 3) {
throw ET<int>();
} else {
} else {
throw ET<double>();
}
return 0;

View File

@ -24,7 +24,7 @@ class ex1 : public myException
class ex2 : public myException
{
public:
virtual const char *name() { return "ex2"; }
virtual const char *name() { return "ex2"; }
};
%}

View File

@ -220,7 +220,7 @@ public class CommentParser implements Doclet {
Iterator< Entry<String, String> > it = m_parsedComments.entrySet().iterator();
while (it.hasNext()) {
while (it.hasNext()) {
Entry<String, String> e = (Entry<String, String>) it.next();
String commentText = e.getValue();

View File

@ -31,7 +31,7 @@ initArray()
y[i] = ((double) i)/ ((double) n);
n = sizeof(bars)/sizeof(bars[0]);
for(i = 0; i < n; i++) {
for(i = 0; i < n; i++) {
bars[i].i = x[i+2];
bars[i].d = y[i+2];
}

View File

@ -32,7 +32,7 @@
Foo *f;
public:
CBar(Foo *f) : f(f) { }
const Foo *operator->() {
const Foo *operator->() {
return f;
}
};

View File

@ -4,7 +4,7 @@
%typemap(in) A* (A* ptr) {
if (SWIG_ConvertPtr($input, (void**) &ptr, $1_descriptor, 0) != -1) {
$1 = ptr;
} else {
} else {
$1 = new A();
}
}

View File

@ -54,7 +54,7 @@ void CheckRetTypemapUsed() {
%}
%newobject FFoo::Bar(bool) const ;
%typemap(newfree) char* Bar(bool) {
%typemap(newfree) char* Bar(bool) {
/* hello */ delete[] result;
}

View File

@ -8,7 +8,7 @@ SWIGINTERN int SWIG_AsVal_string (Napi::Value valRef, Napi::String *str)
if (!valRef.IsString()) {
return SWIG_TypeError;
}
if(str != SWIG_NULLPTR) {
if(str != SWIG_NULLPTR) {
*str = valRef.ToString();
}
return SWIG_OK;

View File

@ -15,7 +15,7 @@ SWIGINTERN int SWIG_AsVal_string (SWIGV8_VALUE valRef, SWIGV8_STRING *str)
if (!valRef->IsString()) {
return SWIG_TypeError;
}
if(str != SWIG_NULLPTR) {
if(str != SWIG_NULLPTR) {
*str = SWIGV8_TO_STRING(valRef);
}
return SWIG_OK;

View File

@ -119,6 +119,6 @@ void swiglua_ref_get(SWIGLUA_REF* pref){
%{ swiglua_ref_set(&$1,L,$input); %}
%typemap(out) SWIGLUA_REF
%{ if ($1.L!=0) {swiglua_ref_get(&$1);} else {lua_pushnil(L);}
%{ if ($1.L!=0) {swiglua_ref_get(&$1);} else {lua_pushnil(L);}
SWIG_arg++; %}

View File

@ -102,7 +102,7 @@ namespace swig {
template <class Sequence, class Difference>
inline typename Sequence::iterator
getpos(Sequence* self, Difference i) {
getpos(Sequence* self, Difference i) {
typename Sequence::iterator pos = self->begin();
std::advance(pos, check_index(i,self->size()));
return pos;
@ -110,7 +110,7 @@ namespace swig {
template <class Sequence, class Difference>
inline typename Sequence::const_iterator
cgetpos(const Sequence* self, Difference i) {
cgetpos(const Sequence* self, Difference i) {
typename Sequence::const_iterator pos = self->begin();
std::advance(pos, check_index(i,self->size()));
return pos;

View File

@ -280,7 +280,7 @@ SWIG_AsVal_dec(unsigned long long)(SV *obj, unsigned long long *val)
* (UVSIZE <= sizeof(*val) || v <= ULLONG_MAX) */
if (val) *val = SvUV(obj);
return SWIG_OK;
} else if (SvIOK(obj)) {
} else if (SvIOK(obj)) {
IV v = SvIV(obj);
if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULLONG_MAX)) {
if (val) *val = v;

View File

@ -15,7 +15,7 @@ SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
STRLEN len = 0;
char *cstr = SvPV(obj, len);
size_t size = len + 1;
if (cptr) {
if (cptr) {
if (alloc) {
if (*alloc == SWIG_NEWOBJ) {
*cptr = %new_copy_array(cstr, size, char);

View File

@ -131,7 +131,7 @@ SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
VALUE exceptionClass = getExceptionClass();
if (rb_obj_is_kind_of(obj, exceptionClass)) {
return obj;
} else {
} else {
return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
}
}

View File

@ -29,7 +29,7 @@
%typemap(varin,fragment=SWIG_AsVal_frag(int),noblock=1) enum SWIGTYPE {
if (sizeof(int) != sizeof($1)) {
%variable_fail(SWIG_AttributeError,"$type", "arch, read-only $name");
} else {
} else {
int ecode = SWIG_AsVal(int)($input, %reinterpret_cast(&$1,int*));
if (!SWIG_IsOK(ecode)) {
%variable_fail(ecode, "$type", "$name");

View File

@ -4336,7 +4336,7 @@ cpp_template_decl : TEMPLATE LESSTHAN template_parms GREATERTHAN {
Delete(ty);
Delete(fname);
}
} else if ($$) {
} else if ($$) {
Setattr($$, "templatetype", nodeType($$));
set_nodeType($$,"template");
Setattr($$,"templateparms", $3);