mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
constify vars
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1890 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
104424a34c
commit
67d3d47194
@ -1,5 +1,9 @@
|
||||
2001-04-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* MenuBackend.C (class compare_format): put into anon namespace
|
||||
(expand): constify label, names, action, action2
|
||||
(expand):
|
||||
|
||||
* text.C (SingleWidth): constify font
|
||||
(IsBoundary): constify rtl2
|
||||
(GetVisibleRow): constify ww
|
||||
|
@ -219,6 +219,9 @@ void Menu::checkShortcuts() const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class compare_format {
|
||||
public:
|
||||
bool operator()(Format const * p1, Format const * p2) {
|
||||
@ -226,6 +229,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void Menu::expand(Menu & tomenu, Buffer * buf) const
|
||||
{
|
||||
for (const_iterator cit = begin();
|
||||
@ -236,10 +242,10 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
|
||||
for (LastFiles::const_iterator lfit = lastfiles->begin();
|
||||
lfit != lastfiles->end() && ii < 10;
|
||||
++lfit, ++ii) {
|
||||
string label = tostr(ii) + ". "
|
||||
string const label = tostr(ii) + ". "
|
||||
+ MakeDisplayPath((*lfit), 30)
|
||||
+ '|' + tostr(ii);
|
||||
int action = lyxaction.
|
||||
int const action = lyxaction.
|
||||
getPseudoAction(LFUN_FILE_OPEN,
|
||||
(*lfit));
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
@ -249,7 +255,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
|
||||
break;
|
||||
|
||||
case MenuItem::Documents: {
|
||||
vector<string> names = bufferlist.getFileNames();
|
||||
vector<string> const names = bufferlist.getFileNames();
|
||||
|
||||
if (names.empty()) {
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
@ -260,9 +266,10 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
|
||||
|
||||
for (vector<string>::const_iterator docit = names.begin();
|
||||
docit != names.end() ; ++docit) {
|
||||
int action =
|
||||
int const action =
|
||||
lyxaction.getPseudoAction(LFUN_SWITCHBUFFER, *docit);
|
||||
string label = MakeDisplayPath(*docit, 30);
|
||||
string const label =
|
||||
MakeDisplayPath(*docit, 30);
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
label, action));
|
||||
}
|
||||
@ -306,7 +313,7 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
|
||||
label = _("Ascii text as paragraphs");
|
||||
if (!(*fit)->shortcut().empty())
|
||||
label += "|" + (*fit)->shortcut();
|
||||
int action2 = lyxaction.
|
||||
int const action2 = lyxaction.
|
||||
getPseudoAction(action, (*fit)->name());
|
||||
tomenu.add(MenuItem(MenuItem::Command,
|
||||
label, action2));
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright 1995-2000 The LyX Team
|
||||
* Copyright 1995-2001 The LyX Team
|
||||
*
|
||||
* ======================================================*/
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include <config.h>
|
||||
#include "LString.h"
|
||||
|
||||
// This is only included to provide stuff for the non-public sections
|
||||
|
Loading…
Reference in New Issue
Block a user