typos and a comment

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35862 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kornel Benko 2010-10-27 06:09:10 +00:00
parent 1e3187c8e9
commit cf9112a3a3

View File

@ -1,4 +1,4 @@
#LyX 1.6.7 created this file. For more info see http://www.lyx.org/ #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 345 \lyxformat 345
\begin_document \begin_document
\begin_header \begin_header
@ -14,7 +14,6 @@
\font_osf false \font_osf false
\font_sf_scale 100 \font_sf_scale 100
\font_tt_scale 100 \font_tt_scale 100
\graphics default \graphics default
\paperfontsize default \paperfontsize default
\spacing single \spacing single
@ -29,16 +28,14 @@
\secnumdepth 3 \secnumdepth 3
\tocdepth 3 \tocdepth 3
\paragraph_separation indent \paragraph_separation indent
\defskip medskip
\quotes_language english \quotes_language english
\papercolumns 1 \papercolumns 1
\papersides 1 \papersides 1
\paperpagestyle default \paperpagestyle default
\listings_params "basicstyle={\footnotesize}" \listings_params "basicstyle={\footnotesize}"
\tracking_changes false \tracking_changes true
\output_changes false \output_changes false
\author "" \author "Kornel Benko" Kornel.Benko@berlin.de
\author ""
\end_header \end_header
\begin_body \begin_body
@ -511,7 +508,13 @@ c/exception_safety.html Probably the most interesting point here is that
for free. for free.
For example, in our Stack implementation, almost everything we did was For example, in our Stack implementation, almost everything we did was
needed to satisfy just the basic guarantee -- and what's presented above needed to satisfy just the basic guarantee -- and what's presented above
very nearly satisfies the strong guarantee, with little of no extra work. very nearly satisfies the strong guarantee, with little o
\change_inserted 0 1288157484
r
\change_deleted 0 1288157483
f
\change_unchanged
no extra work.
Not half bad, considering all the trouble we went to. Not half bad, considering all the trouble we went to.
In addition to these two guarantees, there is one more guarantee that certain In addition to these two guarantees, there is one more guarantee that certain
functions must provide in order to make overall exception safety possible: functions must provide in order to make overall exception safety possible:
@ -1070,6 +1073,16 @@ Use existing structures
\begin_deeper \begin_deeper
\begin_layout Itemize \begin_layout Itemize
\change_inserted 0 1288159254
\begin_inset CommandInset label
LatexCommand label
name "Use-string-wherever"
\end_inset
\change_unchanged
Use string wherever possible. Use string wherever possible.
LyX will someday move to Unicode, and that will be easy if everybody uses LyX will someday move to Unicode, and that will be easy if everybody uses
string now. string now.
@ -1269,8 +1282,12 @@ How to create class interfaces
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
I recently read an article by Scott Meyers in , where he makes a strong I recently read an article by Scott Meyers
case on how non-member functions makes classes more encapsulated, not less. \change_deleted 0 1288158556
in
\change_unchanged
, where he makes a strong case on how non-member functions makes classes
more encapsulated, not less.
Just skipping to the core of this provides us with the following algorithm Just skipping to the core of this provides us with the following algorithm
for deciding what kind of function to add to a class interface: for deciding what kind of function to add to a class interface:
\end_layout \end_layout
@ -1389,6 +1406,18 @@ use the same form in corresponding calls to new and delete, i.e.
write delete[] obj; if new obj[n]; was used to create the object and write write delete[] obj; if new obj[n]; was used to create the object and write
delete obj; if you wrote new obj; Notice strings should be std::string's delete obj; if you wrote new obj; Notice strings should be std::string's
instead of char *'s. instead of char *'s.
\change_inserted 0 1288159280
(this contradicts to
\begin_inset CommandInset ref
LatexCommand ref
reference "Use-string-wherever"
\end_inset
)
\change_unchanged
\end_layout \end_layout
\begin_layout Itemize \begin_layout Itemize
@ -1477,7 +1506,11 @@ And one of mine: (Lgb)
\begin_deeper \begin_deeper
\begin_layout Itemize \begin_layout Itemize
when swiching on enums, refrain from using "default:" if possible when swi
\change_inserted 0 1288159389
t
\change_unchanged
ching on enums, refrain from using "default:" if possible
\end_layout \end_layout
\end_deeper \end_deeper
@ -1735,6 +1768,7 @@ in cases where we explicitly check it->lyxCode().
\end_deeper \end_deeper
\end_deeper \end_deeper
\begin_layout Bibliography \begin_layout Bibliography
\labelwidthstring Bibliography
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "key-1" key "key-1"
@ -1748,6 +1782,7 @@ S.
\end_layout \end_layout
\begin_layout Bibliography \begin_layout Bibliography
\labelwidthstring Bibliography
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "key-2" key "key-2"
@ -1760,6 +1795,7 @@ Sutter, Herb.
\end_layout \end_layout
\begin_layout Bibliography \begin_layout Bibliography
\labelwidthstring Bibliography
\begin_inset CommandInset bibitem \begin_inset CommandInset bibitem
LatexCommand bibitem LatexCommand bibitem
key "key-4" key "key-4"