[K/N] Fix indents
^KT-61259
This commit is contained in:
committed by
Space Team
parent
dc2ea15dee
commit
089b7f31b5
@@ -9,11 +9,11 @@
|
||||
// FILE: auxiliaryCppSources.h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
const char* name();
|
||||
const char* name();
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@ extern "C" {
|
||||
|
||||
static std::string _name = "OK";
|
||||
|
||||
const char* name() {
|
||||
extern "C" const char* name() {
|
||||
return _name.c_str();
|
||||
}
|
||||
|
||||
|
||||
+49
-49
@@ -9,29 +9,29 @@
|
||||
// FILE: incompleteTypes.h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Forward declaration.
|
||||
struct S;
|
||||
extern struct S s;
|
||||
struct S;
|
||||
extern struct S s;
|
||||
|
||||
const char* getContent(struct S* s);
|
||||
void setContent(struct S* s, const char* name);
|
||||
const char* getContent(struct S* s);
|
||||
void setContent(struct S* s, const char* name);
|
||||
|
||||
union U;
|
||||
extern union U u;
|
||||
union U;
|
||||
extern union U u;
|
||||
|
||||
double getDouble(union U* u);
|
||||
void setDouble(union U* u, double value);
|
||||
double getDouble(union U* u);
|
||||
void setDouble(union U* u, double value);
|
||||
|
||||
// Global array of unknown size.
|
||||
extern char array[];
|
||||
extern char array[];
|
||||
|
||||
|
||||
int arrayLength();
|
||||
void setArrayValue(char* array, char value);
|
||||
int arrayLength();
|
||||
void setArrayValue(char* array, char value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -41,52 +41,52 @@ extern "C" {
|
||||
|
||||
extern "C" {
|
||||
|
||||
struct S {
|
||||
std::string name;
|
||||
};
|
||||
struct S {
|
||||
std::string name;
|
||||
};
|
||||
|
||||
S s = {
|
||||
.name = "initial"
|
||||
};
|
||||
S s = {
|
||||
.name = "initial"
|
||||
};
|
||||
|
||||
void setContent(struct S* s, const char* name) {
|
||||
// Note that copy here is intentional: we use it as a workaround
|
||||
// for short lifetime of copy of the passed Kotlin string.
|
||||
s->name = name;
|
||||
}
|
||||
void setContent(struct S* s, const char* name) {
|
||||
// Note that copy here is intentional: we use it as a workaround
|
||||
// for short lifetime of copy of the passed Kotlin string.
|
||||
s->name = name;
|
||||
}
|
||||
|
||||
const char* getContent(struct S* s) {
|
||||
return s->name.c_str();
|
||||
}
|
||||
const char* getContent(struct S* s) {
|
||||
return s->name.c_str();
|
||||
}
|
||||
|
||||
union U {
|
||||
float f;
|
||||
double d;
|
||||
};
|
||||
union U {
|
||||
float f;
|
||||
double d;
|
||||
};
|
||||
|
||||
void setDouble(union U* u, double value) {
|
||||
u->d = value;
|
||||
}
|
||||
void setDouble(union U* u, double value) {
|
||||
u->d = value;
|
||||
}
|
||||
|
||||
double getDouble(union U* u) {
|
||||
return u->d;
|
||||
}
|
||||
double getDouble(union U* u) {
|
||||
return u->d;
|
||||
}
|
||||
|
||||
union U u = {
|
||||
.d = 0.0
|
||||
};
|
||||
union U u = {
|
||||
.d = 0.0
|
||||
};
|
||||
|
||||
char array[5] = { 0, 0, 0, 0, 0 };
|
||||
char array[5] = { 0, 0, 0, 0, 0 };
|
||||
|
||||
void setArrayValue(char* array, char value) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
void setArrayValue(char* array, char value) {
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
array[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
int arrayLength() {
|
||||
return sizeof(array) / sizeof(char);
|
||||
}
|
||||
int arrayLength() {
|
||||
return sizeof(array) / sizeof(char);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -7,11 +7,11 @@ void test_RunInNewThread(void (*)());
|
||||
// FILE: leakMemoryWithRunningThreadUnchecked.h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void test_RunInNewThread(void (*)());
|
||||
void test_RunInNewThread(void (*)());
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user