mirror of https://git.kore.io/kore.git
Code style cleanup in C++ example.
This commit is contained in:
parent
4c07491db6
commit
5af3411513
|
@ -24,6 +24,7 @@ example_class::~example_class() {
|
|||
|
||||
}
|
||||
|
||||
const char* example_class::a() {
|
||||
const char*
|
||||
example_class::a() {
|
||||
return "Hello world!";
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@ public:
|
|||
example_class();
|
||||
~example_class();
|
||||
|
||||
const char* a();
|
||||
const char*
|
||||
a();
|
||||
};
|
||||
|
||||
#endif /* defined(____example_class__) */
|
||||
|
|
|
@ -753,18 +753,15 @@ cli_register_cppfile(char *fpath, struct dirent *dp)
|
|||
struct stat st;
|
||||
char *ext, *opath;
|
||||
|
||||
if ((ext = strrchr(fpath, '.')) == NULL || strcmp(ext, ".cpp")) {
|
||||
if ((ext = strrchr(fpath, '.')) == NULL || strcmp(ext, ".cpp"))
|
||||
return;
|
||||
}
|
||||
|
||||
if (stat(fpath, &st) == -1)
|
||||
cli_fatal("stat(%s): %s", fpath, errno_s);
|
||||
|
||||
(void)cli_vasprintf(&opath, "%s/.objs/%s.o", rootdir, dp->d_name);
|
||||
if (!cli_file_requires_build(&st, opath)) {
|
||||
|
||||
cli_add_cppfile(dp->d_name, fpath, opath, &st, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -778,9 +775,8 @@ cli_register_cfile(char *fpath, struct dirent *dp)
|
|||
struct stat st;
|
||||
char *ext, *opath;
|
||||
|
||||
if ((ext = strrchr(fpath, '.')) == NULL || strcmp(ext, ".c")) {
|
||||
if ((ext = strrchr(fpath, '.')) == NULL || strcmp(ext, ".c"))
|
||||
return;
|
||||
}
|
||||
|
||||
if (stat(fpath, &st) == -1)
|
||||
cli_fatal("stat(%s): %s", fpath, errno_s);
|
||||
|
@ -788,7 +784,6 @@ cli_register_cfile(char *fpath, struct dirent *dp)
|
|||
(void)cli_vasprintf(&opath, "%s/.objs/%s.o", rootdir, dp->d_name);
|
||||
if (!cli_file_requires_build(&st, opath)) {
|
||||
cli_add_cfile(dp->d_name, fpath, opath, &st, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue