mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion] ion_main takes const arguments
This commit is contained in:
committed by
LeaNumworks
parent
577e7db8dd
commit
758c217120
@@ -44,7 +44,7 @@ bool App::Snapshot::lockOnConsole() const {
|
||||
return m_lockOnConsole;
|
||||
}
|
||||
|
||||
void App::Snapshot::setOpt(const char * name, char * value) {
|
||||
void App::Snapshot::setOpt(const char * name, const char * value) {
|
||||
if (strcmp(name, "script") == 0) {
|
||||
m_scriptStore.deleteAllScripts();
|
||||
char * separator = const_cast<char *>(UTF8Helper::CodePointSearch(value, ':'));
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
ScriptStore * scriptStore();
|
||||
#if EPSILON_GETOPT
|
||||
bool lockOnConsole() const;
|
||||
void setOpt(const char * name, char * value) override;
|
||||
void setOpt(const char * name, const char * value) override;
|
||||
#endif
|
||||
private:
|
||||
#if EPSILON_GETOPT
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#define DUMMY_MAIN 0
|
||||
#if DUMMY_MAIN
|
||||
|
||||
void ion_main(int argc, char * argv[]) {
|
||||
void ion_main(int argc, const char * const argv[]) {
|
||||
// Initialize the backlight
|
||||
Ion::Backlight::init();
|
||||
while (1) {
|
||||
@@ -18,7 +18,7 @@ void ion_main(int argc, char * argv[]) {
|
||||
|
||||
#else
|
||||
|
||||
void ion_main(int argc, char * argv[]) {
|
||||
void ion_main(int argc, const char * const argv[]) {
|
||||
// Initialize Poincare::TreePool::sharedPool
|
||||
Poincare::Init();
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
virtual void storageDidChangeForRecord(Ion::Storage::Record) {}
|
||||
virtual Descriptor * descriptor() = 0;
|
||||
#if EPSILON_GETOPT
|
||||
virtual void setOpt(const char * name, char * value) {}
|
||||
virtual void setOpt(const char * name, const char * value) {}
|
||||
#endif
|
||||
/* tidy clean all dynamically-allocated data */
|
||||
virtual void tidy();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* Don't worry though, once all its initialization will be performed, ION will
|
||||
* jump to your code at ion_main, which you have to implement yourself. */
|
||||
|
||||
void ion_main(int argc, char * argv[]);
|
||||
void ion_main(int argc, const char * const argv[]);
|
||||
|
||||
namespace Ion {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ char heap[kHeapSize];
|
||||
extern "C" {
|
||||
char * _heap_start = (char *)heap;
|
||||
char * _heap_end = _heap_start+kHeapSize;
|
||||
int main(int argc, char * argv[]);
|
||||
}
|
||||
|
||||
void Ion::Timing::msleep(uint32_t ms) {
|
||||
|
||||
@@ -17,7 +17,7 @@ void Ion::Timing::msleep(uint32_t ms) {
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
std::vector<char *> arguments(argv, argv + argc);
|
||||
std::vector<const char *> arguments(argv, argv + argc);
|
||||
|
||||
char * language = IonSimulatorGetLanguageCode();
|
||||
if (language != nullptr) {
|
||||
|
||||
@@ -26,7 +26,7 @@ static inline void ion_main_inner() {
|
||||
quiz_print("ALL TESTS FINISHED");
|
||||
}
|
||||
|
||||
void ion_main(int argc, char * argv[]) {
|
||||
void ion_main(int argc, const char * const argv[]) {
|
||||
// Initialize the backlight
|
||||
Ion::Backlight::init();
|
||||
// Initialize Poincare::TreePool::sharedPool
|
||||
|
||||
Reference in New Issue
Block a user