diff options
author | Borja Lorente | 2016-08-16 17:01:30 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-19 16:30:24 +0200 |
commit | ace515643654b07002ee528bbc01f679f699b8cb (patch) | |
tree | b9a4be4415ce2247c279f7ba21dc3d5fd953593e /engines/macventure | |
parent | fa815e73adb88bfd42eb2bec8b2afabbc0e8d7ad (diff) | |
download | scummvm-rg350-ace515643654b07002ee528bbc01f679f699b8cb.tar.gz scummvm-rg350-ace515643654b07002ee528bbc01f679f699b8cb.tar.bz2 scummvm-rg350-ace515643654b07002ee528bbc01f679f699b8cb.zip |
MACVENTURE: Enforce const in prebuilt dialogs
Diffstat (limited to 'engines/macventure')
-rw-r--r-- | engines/macventure/dialog.cpp | 2 | ||||
-rw-r--r-- | engines/macventure/dialog.h | 1 | ||||
-rw-r--r-- | engines/macventure/gui.h | 1 | ||||
-rw-r--r-- | engines/macventure/prebuilt_dialogs.cpp | 2 | ||||
-rw-r--r-- | engines/macventure/prebuilt_dialogs.h | 3 |
5 files changed, 5 insertions, 4 deletions
diff --git a/engines/macventure/dialog.cpp b/engines/macventure/dialog.cpp index ab77f119ea..c6315271b1 100644 --- a/engines/macventure/dialog.cpp +++ b/engines/macventure/dialog.cpp @@ -31,7 +31,7 @@ Dialog::Dialog(Gui *gui, Common::Point pos, uint width, uint height) : Dialog::Dialog(Gui *gui, PrebuiltDialogs prebuilt) { _gui = gui; - const PrebuiltDialog &dialog = prebuiltDialogs[prebuilt]; + const PrebuiltDialog &dialog = g_prebuiltDialogs[prebuilt]; _bounds = dialog.bounds; for (int i = 0; dialog.elements[i].type != kDEEnd; i++) { addPrebuiltElement(dialog.elements[i]); diff --git a/engines/macventure/dialog.h b/engines/macventure/dialog.h index 2ea38b1548..34f99dc643 100644 --- a/engines/macventure/dialog.h +++ b/engines/macventure/dialog.h @@ -33,7 +33,6 @@ namespace MacVenture { using namespace Graphics::MacGUIConstants; class Gui; class DialogElement; -extern PrebuiltDialog prebuiltDialogs[]; class Dialog { public: diff --git a/engines/macventure/gui.h b/engines/macventure/gui.h index 4ad1709e25..f521286dc7 100644 --- a/engines/macventure/gui.h +++ b/engines/macventure/gui.h @@ -53,7 +53,6 @@ class ImageAsset; class Dialog; BorderBounds borderBounds(MVWindowType type); -extern PrebuiltDialog prebuiltDialogs[]; enum MenuAction { kMenuActionAbout, diff --git a/engines/macventure/prebuilt_dialogs.cpp b/engines/macventure/prebuilt_dialogs.cpp index 46b71ab93a..49f2853203 100644 --- a/engines/macventure/prebuilt_dialogs.cpp +++ b/engines/macventure/prebuilt_dialogs.cpp @@ -24,7 +24,7 @@ namespace MacVenture { -PrebuiltDialog prebuiltDialogs[kPrebuiltDialogCount] = { +const PrebuiltDialog g_prebuiltDialogs[kPrebuiltDialogCount] = { {/* kSaveAsDialog */ Common::Rect(0, 146, 456, 254), diff --git a/engines/macventure/prebuilt_dialogs.h b/engines/macventure/prebuilt_dialogs.h index 1c97847455..9aff5c7926 100644 --- a/engines/macventure/prebuilt_dialogs.h +++ b/engines/macventure/prebuilt_dialogs.h @@ -71,6 +71,9 @@ struct PrebuiltDialog { Common::Rect bounds; PrebuiltDialogElement elements[kMaxPrebuiltDialogElements]; }; + +extern const PrebuiltDialog g_prebuiltDialogs[]; + } // End of namespace MacVenture #endif |