diff options
Diffstat (limited to 'include/Utility/Utility.h')
| -rw-r--r-- | include/Utility/Utility.h | 43 | 
1 files changed, 22 insertions, 21 deletions
| diff --git a/include/Utility/Utility.h b/include/Utility/Utility.h index 8d68baa..caf5661 100644 --- a/include/Utility/Utility.h +++ b/include/Utility/Utility.h @@ -6,34 +6,35 @@  #include <glob.h>  /********************************************************************** -* COPYRIGHT 2020 MULTI-TECH SYSTEMS, INC. -* -* ALL RIGHTS RESERVED BY AND FOR THE EXCLUSIVE BENEFIT OF -* MULTI-TECH SYSTEMS, INC. -* -* MULTI-TECH SYSTEMS, INC. - CONFIDENTIAL AND PROPRIETARY -* INFORMATION AND/OR TRADE SECRET. -* -* NOTICE: ALL CODE, PROGRAM, INFORMATION, SCRIPT, INSTRUCTION, -* DATA, AND COMMENT HEREIN IS AND SHALL REMAIN THE CONFIDENTIAL -* INFORMATION AND PROPERTY OF MULTI-TECH SYSTEMS, INC. -* USE AND DISCLOSURE THEREOF, EXCEPT AS STRICTLY AUTHORIZED IN A -* WRITTEN AGREEMENT SIGNED BY MULTI-TECH SYSTEMS, INC. IS PROHIBITED. -* -***********************************************************************/ + * COPYRIGHT 2020 MULTI-TECH SYSTEMS, INC. + * + * ALL RIGHTS RESERVED BY AND FOR THE EXCLUSIVE BENEFIT OF + * MULTI-TECH SYSTEMS, INC. + * + * MULTI-TECH SYSTEMS, INC. - CONFIDENTIAL AND PROPRIETARY + * INFORMATION AND/OR TRADE SECRET. + * + * NOTICE: ALL CODE, PROGRAM, INFORMATION, SCRIPT, INSTRUCTION, + * DATA, AND COMMENT HEREIN IS AND SHALL REMAIN THE CONFIDENTIAL + * INFORMATION AND PROPERTY OF MULTI-TECH SYSTEMS, INC. + * USE AND DISCLOSURE THEREOF, EXCEPT AS STRICTLY AUTHORIZED IN A + * WRITTEN AGREEMENT SIGNED BY MULTI-TECH SYSTEMS, INC. IS PROHIBITED. + * + ***********************************************************************/  inline bool fileExists(std::string file) {      struct stat buffer = {}; -    return (stat (file.c_str(), &buffer) == 0) ? true : false; +    return (stat(file.c_str(), &buffer) == 0) ? true : false;  } -inline std::string toCamelCase(const char * d_name)  { +inline std::string toCamelCase(const char *d_name) {      std::string camelString = strdup(d_name);      std::string tempString = ""; -    for (size_t x = 0; x < camelString.length(); x++){ -        if (camelString[x] == '-' || camelString[x] == '_'){ +    for (size_t x = 0; x < camelString.length(); x++) { +        if (camelString[x] == '-' || camelString[x] == '_') {              tempString = camelString.substr(x + 1, 1); -            transform(tempString.begin(), tempString.end(), tempString.begin(), toupper); +            transform(tempString.begin(), tempString.end(), tempString.begin(), +                      toupper);              camelString.erase(x, 2);              camelString.insert(x, tempString);          } @@ -50,7 +51,7 @@ inline void exitHandler(int code) {  inline mode_t fileType(std::string file) {      struct stat buf = {}; -    if (stat (file.c_str(), &buf) == 0) { +    if (stat(file.c_str(), &buf) == 0) {          return buf.st_mode & S_IFMT;      } else {          return -1; | 
