mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
- Add missing STL includes for correctness - gcc is too forgiving
- Add missing using statements - Guard #warning statements git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9494 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
308617e605
commit
282bf655ed
@ -11,6 +11,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "BranchList.h"
|
||||
#include <algorithm>
|
||||
|
||||
using std::string;
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#include "Sectioning.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
string const & Section::name() const
|
||||
{
|
||||
return name_;
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <boost/current_function.hpp>
|
||||
|
||||
#include <sstream>
|
||||
#include <limits>
|
||||
|
||||
using lyx::pit_type;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
class LyXFont;
|
||||
|
||||
/// Simple wrapper around three ints
|
||||
struct Dimension {
|
||||
class Dimension {
|
||||
public:
|
||||
/// constructor
|
||||
Dimension() : wid(0), asc(0), des(0) {}
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "support/filetools.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
using std::string;
|
||||
|
||||
namespace lyx {
|
||||
|
@ -89,7 +89,9 @@ namespace {
|
||||
|
||||
string const numtostr(double val) {
|
||||
string a(convert<string>(val));
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Will this test ever trigger? (Lgb)
|
||||
#endif
|
||||
if (a == "0")
|
||||
a.erase();
|
||||
return a;
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
||||
using lyx::graphics::PreviewLoader;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "insetcommand.h"
|
||||
|
||||
struct LaTeXFeatures;
|
||||
class LaTeXFeatures;
|
||||
|
||||
/** The url inset
|
||||
*/
|
||||
|
@ -77,7 +77,9 @@ void UpdatableInset::scroll(BufferView & bv, int offset) const
|
||||
else
|
||||
scx += offset;
|
||||
} else {
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning metrics?
|
||||
#endif
|
||||
if (!scx && xo_ + width() < bv.workWidth() - 20)
|
||||
return;
|
||||
if (xo_ - scx + offset + width() < bv.workWidth() - 20) {
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "support/lyxalgo.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <functional>
|
||||
|
||||
using lyx::support::compare_ascii_no_case;
|
||||
using lyx::support::getFormatFromContents;
|
||||
using lyx::support::MakeDisplayPath;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "math_binaryopinset.h"
|
||||
#include "PainterInfo.h"
|
||||
#include "metricsinfo.h"
|
||||
#include "support/std_ostream.h"
|
||||
#include "math_support.h"
|
||||
#include "math_mathmlstream.h"
|
||||
@ -26,7 +26,7 @@ MathBinaryOpInset::MathBinaryOpInset(char op)
|
||||
{}
|
||||
|
||||
|
||||
auto_ptr<InsetBase> MathBinaryOpInset::clone() const
|
||||
std::auto_ptr<InsetBase> MathBinaryOpInset::clone() const
|
||||
{
|
||||
return auto_ptr<InsetBase>(new MathBinaryOpInset(*this));
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "math_xyarrowinset.h"
|
||||
#include "math_xymatrixinset.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "math_streamstr.h"
|
||||
#include "math_support.h"
|
||||
@ -27,9 +26,9 @@ MathXYArrowInset::MathXYArrowInset()
|
||||
{}
|
||||
|
||||
|
||||
auto_ptr<InsetBase> MathXYArrowInset::clone() const
|
||||
std::auto_ptr<InsetBase> MathXYArrowInset::clone() const
|
||||
{
|
||||
return auto_ptr<InsetBase>(new MathXYArrowInset(*this));
|
||||
return std::auto_ptr<InsetBase>(new MathXYArrowInset(*this));
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,7 +88,7 @@ ParagraphList::const_iterator searchEnvironment(ParagraphList::const_iterator co
|
||||
if(p->params().depth() < par->params().depth())
|
||||
return p;
|
||||
|
||||
if( style->latexname() != bstyle->latexname() and p->params().depth() == par->params().depth() )
|
||||
if( style->latexname() != bstyle->latexname() && p->params().depth() == par->params().depth() )
|
||||
return p;
|
||||
}
|
||||
return pend;
|
||||
@ -132,7 +132,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
|
||||
// Opening outter tag
|
||||
sgml::openTag(buf, os, runparams, *pbegin);
|
||||
os << '\n';
|
||||
if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru)
|
||||
if (bstyle->latextype == LATEX_ENVIRONMENT && bstyle->pass_thru)
|
||||
os << "<![CDATA[";
|
||||
|
||||
while (par != pend) {
|
||||
@ -204,7 +204,7 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
|
||||
}
|
||||
}
|
||||
|
||||
if (bstyle->latextype == LATEX_ENVIRONMENT and bstyle->pass_thru)
|
||||
if (bstyle->latextype == LATEX_ENVIRONMENT && bstyle->pass_thru)
|
||||
os << "]]>";
|
||||
|
||||
// Closing outter tag
|
||||
|
@ -515,7 +515,9 @@ void RowPainter::paintFirst()
|
||||
} else {
|
||||
spacing_val = buffer.params().spacing().getValue();
|
||||
}
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Look is this correct?
|
||||
#endif
|
||||
int const labeladdon = int(font_metrics::maxHeight(font) * layout->spacing.getValue() * spacing_val);
|
||||
|
||||
int const maxdesc = int(font_metrics::maxDescent(font) * layout->spacing.getValue() * spacing_val)
|
||||
|
@ -220,7 +220,7 @@ void openTag(Buffer const & buf, ostream & os, OutputParams const & runparams, P
|
||||
if (param.find('#') != string::npos) {
|
||||
string::size_type pos = param.find("id=<");
|
||||
string::size_type end = param.find(">");
|
||||
if( pos != string::npos and end != string::npos)
|
||||
if( pos != string::npos && end != string::npos)
|
||||
param.erase(pos, end-pos + 1);
|
||||
}
|
||||
attribute = id + ' ' + param;
|
||||
|
@ -18,15 +18,15 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// File : gzstream.C
|
||||
// Revision : $Revision: 1.2 $
|
||||
// Revision_date : $Date: 2003/09/09 18:27:24 $
|
||||
// Revision : $Revision: 1.3 $
|
||||
// Revision_date : $Date: 2005/01/18 14:15:57 $
|
||||
// Author(s) : Deepak Bandyopadhyay, Lutz Kettner
|
||||
//
|
||||
// Standard streambuf implementation following Nicolai Josuttis, "The
|
||||
// Standard C++ Library".
|
||||
// ============================================================================
|
||||
|
||||
#include <gzstream.h>
|
||||
#include "gzstream.h"
|
||||
#include <iostream>
|
||||
#include <string.h> // for memcpy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user