mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-06 11:36:51 +03:00
Remove newline in version (#1891)
* remove newline in version * . * . Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -15,6 +15,7 @@ extern "C"
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "Helper.h"
|
#include "Helper.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
const char* build_time(void)
|
const char* build_time(void)
|
||||||
@@ -63,7 +64,10 @@ std::string getHTMLversion(void){
|
|||||||
fgets(buf, sizeof(buf), pFile); // Line 1: Version
|
fgets(buf, sizeof(buf), pFile); // Line 1: Version
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
|
|
||||||
return std::string(buf);
|
string value = string(buf);
|
||||||
|
value.erase(std::remove(value.begin(), value.end(), '\n'), value.end()); // Remove any newlines
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getHTMLcommit(void){
|
std::string getHTMLcommit(void){
|
||||||
@@ -79,7 +83,10 @@ std::string getHTMLcommit(void){
|
|||||||
fgets(buf, sizeof(buf), pFile); // Line 2: Commit
|
fgets(buf, sizeof(buf), pFile); // Line 2: Commit
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
|
|
||||||
return std::string(buf);
|
string value = string(buf);
|
||||||
|
value.erase(std::remove(value.begin(), value.end(), '\n'), value.end()); // Remove any newlines
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // _VERSION_H
|
#endif // _VERSION_H
|
||||||
Reference in New Issue
Block a user