]> git.lyx.org Git - lyx.git/blobdiff - src/HSpace.cpp
Add missing math delim decorations
[lyx.git] / src / HSpace.cpp
index 5a2b16695fbfcc9f552258d956e82c8b74d13382..7d03ecc1d7df562695d0a7fce9d66763b0e1887f 100644 (file)
@@ -96,16 +96,13 @@ string const HSpace::asLatexCommand() const
        switch (kind_) {
        case DEFAULT:
                return string();
-               break;
-       case LENGTH: {
+       case LENGTH:
                return len_.asLatexString();
-               break;
-                                }
-       default: {
-               LASSERT(false, /**/);
-               return string();
-                        }
+       default:
+               LATTEST(false);
+               // fall through in release mode
        }
+       return string();
 }
 
 
@@ -142,21 +139,20 @@ string HSpace::asHTMLLength() const
        return result;
 }
 
+
 int HSpace::inPixels(BufferView const & bv) const
 {
        switch (kind_) {
        case DEFAULT:
                // FIXME: replace by correct length
                return bv.buffer().params().getIndentation().inPixels(bv);
-               //return 0;
-               break;
        case LENGTH:
                return len_.len().inPixels(bv.workWidth());
-               break;
        default:
-               LASSERT(false, /**/);
-               return 0;
+               LATTEST(false);
+               // fall through in release mode
        }
+       return 0;
 }