Mercurial > octave
changeset 23807:336f89b6208b
Use character literals 'c' rather than string literals "c" when possible.
Better performance when string constructor isn't required.
* Figure.cc, __init_qt__.cc, files-dock-widget.cc, file-editor-tab.cc,
file-editor.cc, octave-qscintilla.cc, main-window.cc, octave-dock-widget.cc,
octave-qt-link.cc, parser.cc, webinfo.cc, resource-manager.cc,
settings-dialog.cc, workspace-view.cc, __magick_read__.cc, balance.cc,
debug.cc, dynamic-ld.cc, ft-text-renderer.cc, gl-render.cc, gl2ps-print.cc,
graphics.cc, hook-fcn.h, input.cc, load-path.cc, load-save.cc, ls-hdf5.cc,
oct-hist.cc, oct-stream.cc, pager.cc, pr-output.cc, qz.cc, symtab.cc, symtab.h,
tril.cc, __delaunayn__.cc, __init_fltk__.cc, __voronoi__.cc, audioread.cc,
ccolamd.cc, colamd.cc, convhulln.cc, ov-base-int.cc, ov-base-mat.cc,
ov-base-scalar.cc, ov-base.cc, ov-bool-mat.cc, ov-cell.cc, ov-class.cc,
ov-classdef.cc, ov-colon.cc, ov-complex.cc, ov-cx-mat.cc, ov-fcn-handle.cc,
ov-fcn-inline.cc, ov-fcn.h, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-java.cc,
ov-oncleanup.cc, ov-range.cc, ov-re-mat.cc, ov-re-sparse.cc, ov-str-mat.cc,
ov-struct.cc, ov-usr-fcn.cc, ov.cc, octave.cc, bp-table.cc, jit-ir.cc,
jit-ir.h, jit-typeinfo.cc, pt-funcall.cc, pt-idx.cc, pt-pr-code.cc, pt.h,
Array.cc, CDiagMatrix.cc, CMatrix.cc, CNDArray.cc, CRowVector.cc, CSparse.cc,
Range.cc, boolSparse.cc, dDiagMatrix.cc, dMatrix.cc, dNDArray.cc,
dRowVector.cc, dSparse.cc, fCDiagMatrix.cc, fCMatrix.cc, fCNDArray.cc,
fCRowVector.cc, fDiagMatrix.cc, fMatrix.cc, fNDArray.cc, fRowVector.cc,
idx-vector.cc, intNDArray.cc, CollocWt.cc, DASPK.cc, DASRT.cc, DASSL.cc,
LSODE.cc, oct-time.cc, cmd-hist.cc, kpse.cc, lo-array-errwarn.cc, lo-regexp.cc,
lo-utils.cc, str-vec.cc, url-transfer.cc, main-cli.cc, main-gui.cc,
mkoctfile.in.cc:
Replace 1-character string literals "c" with the character literal 'c'.
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/graphics/Figure.cc Fri Jul 28 15:40:00 2017 -0700 @@ -285,7 +285,7 @@ std::string direction = zm.getfield ("Direction").string_value (); - mode += " " + direction; + mode += ' ' + direction; } return mouse_mode_from_string (mode); @@ -906,7 +906,7 @@ { std::string msg; - std::string file = octave::sys::tempnam ("", "oct-", msg) + "." + format; + std::string file = octave::sys::tempnam ("", "oct-", msg) + '.' + format; if (file.empty ()) {
--- a/libgui/graphics/__init_qt__.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/graphics/__init_qt__.cc Fri Jul 28 15:40:00 2017 -0700 @@ -187,7 +187,7 @@ appendDirSep (const QString& d) { if (! d.endsWith ("/") && ! d.endsWith (QDir::separator ())) - return (d + "/"); + return (d + '/'); return d; } @@ -220,7 +220,7 @@ if (defaultFileName.isEmpty ()) defaultFileName = defaultDirectory; else - defaultFileName = defaultDirectory + "/" + defaultFileName; + defaultFileName = defaultDirectory + '/' + defaultFileName; QStringList filterSpecs = makeFilterSpecs (args(0).cell_value ()); @@ -298,7 +298,7 @@ if (defaultFileName.isEmpty ()) defaultFileName = defaultDirectory; else - defaultFileName = defaultDirectory + "/" + defaultFileName; + defaultFileName = defaultDirectory + '/' + defaultFileName; QStringList filterSpecs = makeFilterSpecs (args(0).cell_value ());
--- a/libgui/src/files-dock-widget.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/files-dock-widget.cc Fri Jul 28 15:40:00 2017 -0700 @@ -663,8 +663,8 @@ QLineEdit::Normal, old_name, &ok); if (ok && new_name.length () > 0) { - new_name = path.absolutePath () + "/" + new_name; - old_name = path.absolutePath () + "/" + old_name; + new_name = path.absolutePath () + '/' + new_name; + old_name = path.absolutePath () + '/' + old_name; path.rename (old_name, new_name); _file_system_model->revert (); } @@ -880,7 +880,7 @@ QLineEdit::Normal, tr ("New File.txt"), &ok); if (ok && name.length () > 0) { - name = parent_dir + "/" + name; + name = parent_dir + '/' + name; QFile file (name); file.open (QIODevice::WriteOnly);
--- a/libgui/src/m-editor/file-editor-tab.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/m-editor/file-editor-tab.cc Fri Jul 28 15:40:00 2017 -0700 @@ -227,10 +227,10 @@ // encoding, not updated with the settings #if defined (Q_OS_WIN32) - _encoding = settings->value ("editor/default_encoding","SYSTEM") + _encoding = settings->value ("editor/default_encoding", "SYSTEM") .toString (); #else - _encoding = settings->value ("editor/default_encoding","UTF-8") + _encoding = settings->value ("editor/default_encoding", "UTF-8") .toString (); #endif _enc_indicator->setText (_encoding); @@ -387,7 +387,7 @@ if (cond == "") cond = _edit_area->selectedText (); else - cond = "(" + cond + ") || (" + _edit_area->selectedText () + ")"; + cond = '(' + cond + ") || (" + _edit_area->selectedText () + ')'; } bool valid = false; @@ -2445,7 +2445,7 @@ void file_editor_tab::auto_margin_width () { - _edit_area->setMarginWidth (2, "1"+QString::number (_edit_area->lines ())); + _edit_area->setMarginWidth (2, "1" + QString::number (_edit_area->lines ())); } // the following close request was changed from a signal slot into a
--- a/libgui/src/m-editor/file-editor.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/m-editor/file-editor.cc Fri Jul 28 15:40:00 2017 -0700 @@ -1312,11 +1312,11 @@ QString base_name = name; // get a copy // replace intended '&' ("&&") by a temp. string - base_name.replace ("&&","___octave_amp_replacement___"); + base_name.replace ("&&", "___octave_amp_replacement___"); // remove single '&' (shortcut) base_name.remove ("&"); // restore intended '&' - base_name.replace ("___octave_amp_replacement___","&&"); + base_name.replace ("___octave_amp_replacement___", "&&"); // remember names with and without shortcut _hash_menu_text[menu] = QStringList () << name << base_name;
--- a/libgui/src/m-editor/octave-qscintilla.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/m-editor/octave-qscintilla.cc Fri Jul 28 15:40:00 2017 -0700 @@ -249,12 +249,12 @@ _word_at_cursor = wordAtPoint (local_pos); if (! _word_at_cursor.isEmpty ()) { - context_menu->addAction (tr ("Help on") + " " + _word_at_cursor, + context_menu->addAction (tr ("Help on") + ' ' + _word_at_cursor, this, SLOT (contextmenu_help (bool))); context_menu->addAction (tr ("Documentation on") - + " " + _word_at_cursor, + + ' ' + _word_at_cursor, this, SLOT (contextmenu_doc (bool))); - context_menu->addAction (tr ("Edit") + " " + _word_at_cursor, + context_menu->addAction (tr ("Edit") + ' ' + _word_at_cursor, this, SLOT (contextmenu_edit (bool))); } } @@ -534,7 +534,7 @@ else { if (first_word == "unwind_protect") - first_word = "_" + first_word; + first_word = '_' + first_word; next_line = "end" + first_word + "\n"; }
--- a/libgui/src/main-window.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/main-window.cc Fri Jul 28 15:40:00 2017 -0700 @@ -531,7 +531,7 @@ // run while we wait for the page to load. Then emit the signal // to display it when we have the page contents. - QString url = base_url + "/" + page; + QString url = base_url + '/' + page; std::ostringstream buf; octave::url_transfer octave_dot_org (url.toStdString (), buf); @@ -2020,11 +2020,11 @@ QString base_name = name; // get a copy // replace intended '&' ("&&") by a temp. string - base_name.replace ("&&","___octave_amp_replacement___"); + base_name.replace ("&&", "___octave_amp_replacement___"); // remove single '&' (shortcut) base_name.remove ("&"); // restore intended '&' - base_name.replace ("___octave_amp_replacement___","&&"); + base_name.replace ("___octave_amp_replacement___", "&&"); // remember names with and without shortcut _hash_menu_text[menu] = QStringList () << name << base_name;
--- a/libgui/src/octave-dock-widget.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/octave-dock-widget.cc Fri Jul 28 15:40:00 2017 -0700 @@ -226,7 +226,7 @@ setWindowFlags (Qt::Window); QString css = styleSheet (); - css.replace ("widget-undock","widget-dock"); + css.replace ("widget-undock", "widget-dock"); setStyleSheet (css); #endif @@ -282,7 +282,7 @@ setWindowFlags (Qt::Widget); QString css = styleSheet (); - css.replace ("widget-dock","widget-undock"); + css.replace ("widget-dock", "widget-undock"); setStyleSheet (css); #endif
--- a/libgui/src/octave-qt-link.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/octave-qt-link.cc Fri Jul 28 15:40:00 2017 -0700 @@ -232,7 +232,7 @@ name = ext.toUpper () + " Files"; } - retval.append (name + " (" + ext + ")"); + retval.append (name + " (" + ext + ')'); } return retval;
--- a/libgui/src/qtinfo/parser.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/qtinfo/parser.cc Fri Jul 28 15:40:00 2017 -0700 @@ -62,7 +62,7 @@ { if (info_file_exists) break; - info_file_exists = QFileInfo (info.absoluteFilePath () + "." + + info_file_exists = QFileInfo (info.absoluteFilePath () + '.' + it.key ()).exists (); } @@ -73,7 +73,7 @@ QDir infoDir (path); QStringList filter; - filter.append (fileName + "*"); + filter.append (fileName + '*'); _info_files = infoDir.entryInfoList (filter, QDir::Files); @@ -240,7 +240,7 @@ line = line_buffer; // and take the first instead // now correct the size of the dropped line and 5 additional chars for (i = 1; i < len + 6; i++) - line.insert (line.size ()-1,QByteArray (" ")); // adding blanks + line.insert (line.size ()-1, QByteArray (" ")); // adding blanks } if (line.at(0) == 31) @@ -318,8 +318,8 @@ if (url_link.isEmpty ()) url_link = note; - term.replace (":",""); - note.replace (":",""); + term.replace (":", ""); + note.replace (":", ""); note.replace (QRegExp ("`([^']+)'"),"\\1"); // no extra format in links QRegExp re_break ("(\n[ ]*)"); @@ -334,16 +334,16 @@ if (re_break.indexIn (url_link) != -1) term += re_break.cap (1); else if (re_break.indexIn (re.cap (2)) != -1) - href = re_break.cap (1) + " "; + href = re_break.cap (1) + ' '; else if (re_break.indexIn (note) != -1) term += re_break.cap (1); note.replace (re_break," "); url_link = url_link.trimmed (); - url_link.replace ("\n"," "); - url_link.replace (QRegExp (" +")," "); - url_link.replace ("<b>",""); - url_link.replace ("</b>",""); + url_link.replace ("\n", " "); + url_link.replace (QRegExp (" +"), " "); + url_link.replace ("<b>", ""); + url_link.replace ("</b>", ""); href += R"(<font style="color:DarkGray; font-weight:bold;">»</font>)"; href += " <a href='" + url_link + "'>" + note + "</a>" + term; @@ -559,9 +559,9 @@ QString results; QStringList words = text.split (" ", QString::SkipEmptyParts); - QString re_program ("(" + QRegExp::escape (words.at (0))); + QString re_program ('(' + QRegExp::escape (words.at (0))); for (int i = 1; i < words.size (); i++) - re_program += "|" + QRegExp::escape (words.at (i)); + re_program += '|' + QRegExp::escape (words.at (i)); re_program += ')'; QRegExp re (re_program, Qt::CaseInsensitive);
--- a/libgui/src/qtinfo/webinfo.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/qtinfo/webinfo.cc Fri Jul 28 15:40:00 2017 -0700 @@ -184,7 +184,7 @@ { // no XREF in the tabs QString tab_text = node_name; - tab_text.replace ("XREF",""); + tab_text.replace ("XREF", ""); //Check if node has been already opened. for (int i = 0; i < _tab_bar->count (); i++)
--- a/libgui/src/resource-manager.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/resource-manager.cc Fri Jul 28 15:40:00 2017 -0700 @@ -115,7 +115,7 @@ if (settings) { // get the locale from the settings if already available - language = settings->value ("language","SYSTEM").toString (); + language = settings->value ("language", "SYSTEM").toString (); } if (language == "SYSTEM")
--- a/libgui/src/settings-dialog.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/settings-dialog.cc Fri Jul 28 15:40:00 2017 -0700 @@ -287,7 +287,7 @@ // System at beginning ui->comboBox_language->insertItem (0,tr ("System setting")); ui->comboBox_language->insertSeparator (1); // separator after System - QString language = settings->value ("language","SYSTEM").toString (); + QString language = settings->value ("language", "SYSTEM").toString (); if (language == "SYSTEM") language = tr ("System setting"); int selected = ui->comboBox_language->findText (language); @@ -312,7 +312,7 @@ icon_group->addButton (ui->general_icon_graphic); icon_group->addButton (ui->general_icon_letter); QString widget_icon_set = - settings->value ("DockWidgets/widget_icon_set","NONE").toString (); + settings->value ("DockWidgets/widget_icon_set", "NONE").toString (); ui->general_icon_octave-> setChecked (true); // the default (if invalid set) ui->general_icon_octave-> setChecked (widget_icon_set == "NONE"); ui->general_icon_graphic-> setChecked (widget_icon_set == "GRAPHIC"); @@ -501,7 +501,7 @@ // terminal ui->terminal_fontName->setCurrentFont (QFont ( - settings->value ("terminal/fontName","Courier New").toString ())); + settings->value ("terminal/fontName", "Courier New").toString ())); ui->terminal_fontSize->setValue ( settings->value ("terminal/fontSize", 10).toInt ()); ui->terminal_history_buffer->setValue (
--- a/libgui/src/workspace-view.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libgui/src/workspace-view.cc Fri Jul 28 15:40:00 2017 -0700 @@ -326,13 +326,13 @@ menu.addSeparator (); - menu.addAction ("disp (" + var_name + ")", this, + menu.addAction ("disp (" + var_name + ')', this, SLOT (handle_contextmenu_disp ())); - menu.addAction ("plot (" + var_name + ")", this, + menu.addAction ("plot (" + var_name + ')', this, SLOT (handle_contextmenu_plot ())); - menu.addAction ("stem (" + var_name + ")", this, + menu.addAction ("stem (" + var_name + ')', this, SLOT (handle_contextmenu_stem ())); menu.addSeparator ();
--- a/libinterp/corefcn/__magick_read__.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/__magick_read__.cc Fri Jul 28 15:40:00 2017 -0700 @@ -95,7 +95,7 @@ // GM PseudoClass says. const std::string color_type = const_cast<Magick::Image&> (img).attribute ("PNG:IHDR.color-type-orig"); - if (! color_type.empty() && color_type != "3") + if (! color_type.empty () && color_type != "3") indexed = false; } } @@ -1442,7 +1442,7 @@ { try { - Magick::writeImages (imvec.begin (), imvec.end (), ext + ":" + filename); + Magick::writeImages (imvec.begin (), imvec.end (), ext + ':' + filename); } catch (Magick::Warning& w) {
--- a/libinterp/corefcn/balance.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/balance.cc Fri Jul 28 15:40:00 2017 -0700 @@ -217,7 +217,7 @@ // Generalized eigenvalue problem. if (nargin == 2) - bal_job = "B"; + bal_job = 'B'; else bal_job = args(2).xstring_value ("balance: OPT argument must be a string");
--- a/libinterp/corefcn/debug.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/debug.cc Fri Jul 28 15:40:00 2017 -0700 @@ -420,13 +420,13 @@ if (have_unconditional) { const char *_s_ = (have_unconditional > 1) ? "s" : ""; - octave_stdout << "breakpoint" << _s_ <<" in " << fnm_bp_p.first - << " at line" << _s_ << " "; + octave_stdout << "breakpoint" << _s_ << " in " << fnm_bp_p.first + << " at line" << _s_ << ' '; for (const auto& bp : m) { if (bp.cond == "") - octave_stdout << bp.line << " "; + octave_stdout << bp.line << ' '; } octave_stdout << std::endl; } @@ -554,7 +554,7 @@ if (! file_name.empty ()) { - octave_stdout << " [" << file_name << "]" << std::endl; + octave_stdout << " [" << file_name << ']' << std::endl; std::string line = dbg_fcn->get_code_line (l); @@ -908,7 +908,7 @@ os << (i == curr_frame ? " --> " : " ") << std::setw (max_name_len) << name << " at line " << line - << " [" << file << "]" + << " [" << file << ']' << std::endl; }
--- a/libinterp/corefcn/dynamic-ld.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/dynamic-ld.cc Fri Jul 28 15:40:00 2017 -0700 @@ -299,7 +299,7 @@ std::string dynamic_loader::name_mangler (const std::string& name) { - return "G" + name; + return 'G' + name; } std::string
--- a/libinterp/corefcn/ft-text-renderer.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/ft-text-renderer.cc Fri Jul 28 15:40:00 2017 -0700 @@ -193,7 +193,7 @@ // Look first into the font cache, then use fontconfig. If the font // is present in the cache, simply add a reference and return it. - ft_key key (name + ":" + weight + ":" + angle, size); + ft_key key (name + ':' + weight + ':' + angle, size); ft_cache::const_iterator it = cache.find (key); if (it != cache.end ()) @@ -1056,7 +1056,7 @@ { uint32_t code = e.get_symbol_code (); - text_renderer::string fs (std::string ("-"), font, xoffset, yoffset); + text_renderer::string fs ("-", font, xoffset, yoffset); if (code != text_element_symbol::invalid_code && font.is_valid ()) {
--- a/libinterp/corefcn/gl-render.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/gl-render.cc Fri Jul 28 15:40:00 2017 -0700 @@ -1028,8 +1028,8 @@ Matrix b; std::string label (ticklabels(i % nlabels)); - label.erase (0, label.find_first_not_of (" ")); - label = label.substr (0, label.find_last_not_of (" ")+1); + label.erase (0, label.find_first_not_of (' ')); + label = label.substr (0, label.find_last_not_of (' ')+1); // FIXME: As tick text is transparent, shouldn't it be // drawn after axes object, for correct rendering?
--- a/libinterp/corefcn/gl2ps-print.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/gl2ps-print.cc Fri Jul 28 15:40:00 2017 -0700 @@ -278,18 +278,18 @@ std::string include_graph; - size_t found_redirect = old_print_cmd.find (">"); + size_t found_redirect = old_print_cmd.find ('>'); if (found_redirect != std::string::npos) include_graph = old_print_cmd.substr (found_redirect + 1); else include_graph = old_print_cmd; - size_t n_begin = include_graph.find_first_not_of (" "); + size_t n_begin = include_graph.find_first_not_of (' '); if (n_begin != std::string::npos) { - size_t n_end = include_graph.find_last_not_of (" "); + size_t n_end = include_graph.find_last_not_of (' '); include_graph = include_graph.substr (n_begin, n_end - n_begin + 1); } @@ -424,7 +424,7 @@ uint32_t idx = code - 945; if (idx < 25) { - std::string characters("abgdezhqiklmnxoprVstufcyw"); + std::string characters ("abgdezhqiklmnxoprVstufcyw"); retval = characters[idx]; return retval; } @@ -432,137 +432,137 @@ idx = code - 913; if (idx < 25) { - std::string characters("ABGDEZHQIKLMNXOPRVSTUFCYW"); + std::string characters ("ABGDEZHQIKLMNXOPRVSTUFCYW"); retval = characters[idx]; } else if (code == 978) - retval = std::string ("U"); + retval = "U"; else if (code == 215) - retval = std::string ("\xb4"); + retval = "\xb4"; else if (code == 177) - retval = std::string ("\xb1"); + retval = "\xb1"; else if (code == 8501) - retval = std::string ("\xc0"); + retval = "\xc0"; else if (code == 8465) - retval = std::string ("\xc1"); + retval = "\xc1"; else if (code == 8242) - retval = std::string ("\xa2"); + retval = "\xa2"; else if (code == 8736) - retval = std::string ("\xd0"); + retval = "\xd0"; else if (code == 172) - retval = std::string ("\xd8"); + retval = "\xd8"; else if (code == 9829) - retval = std::string ("\xa9"); + retval = "\xa9"; else if (code == 8472) - retval = std::string ("\xc3"); + retval = "\xc3"; else if (code == 8706) - retval = std::string ("\xb6"); + retval = "\xb6"; else if (code == 8704) - retval = std::string ("\x22"); + retval = "\x22"; else if (code == 9827) - retval = std::string ("\xa7"); + retval = "\xa7"; else if (code == 9824) - retval = std::string ("\xaa"); + retval = "\xaa"; else if (code == 8476) - retval = std::string ("\xc2"); + retval = "\xc2"; else if (code == 8734) - retval = std::string ("\xa5"); + retval = "\xa5"; else if (code == 8730) - retval = std::string ("\xd6"); + retval = "\xd6"; else if (code == 8707) - retval = std::string ("\x24"); + retval = "\x24"; else if (code == 9830) - retval = std::string ("\xa8"); + retval = "\xa8"; else if (code == 8747) - retval = std::string ("\xf2"); + retval = "\xf2"; else if (code == 8727) - retval = std::string ("\x2a"); + retval = "\x2a"; else if (code == 8744) - retval = std::string ("\xda"); + retval = "\xda"; else if (code == 8855) - retval = std::string ("\xc4"); + retval = "\xc4"; else if (code == 8901) - retval = std::string ("\xd7"); + retval = "\xd7"; else if (code == 8728) - retval = std::string ("\xb0"); + retval = "\xb0"; else if (code == 8745) - retval = std::string ("\xc7"); + retval = "\xc7"; else if (code == 8743) - retval = std::string ("\xd9"); + retval = "\xd9"; else if (code == 8856) - retval = std::string ("\xc6"); + retval = "\xc6"; else if (code == 8729) - retval = std::string ("\xb7"); + retval = "\xb7"; else if (code == 8746) - retval = std::string ("\xc8"); + retval = "\xc8"; else if (code == 8853) - retval = std::string ("\xc5"); + retval = "\xc5"; else if (code == 8804) - retval = std::string ("\xa3"); + retval = "\xa3"; else if (code == 8712) - retval = std::string ("\xce"); + retval = "\xce"; else if (code == 8839) - retval = std::string ("\xca"); + retval = "\xca"; else if (code == 8801) - retval = std::string ("\xba"); + retval = "\xba"; else if (code == 8773) - retval = std::string ("\x40"); + retval = "\x40"; else if (code == 8834) - retval = std::string ("\xcc"); + retval = "\xcc"; else if (code == 8805) - retval = std::string ("\xb3"); + retval = "\xb3"; else if (code == 8715) - retval = std::string ("\x27"); + retval = "\x27"; else if (code == 8764) - retval = std::string ("\x7e"); + retval = "\x7e"; else if (code == 8733) - retval = std::string ("\xb5"); + retval = "\xb5"; else if (code == 8838) - retval = std::string ("\xcd"); + retval = "\xcd"; else if (code == 8835) - retval = std::string ("\xc9"); + retval = "\xc9"; else if (code == 8739) - retval = std::string ("\xbd"); + retval = "\xbd"; else if (code == 8776) - retval = std::string ("\xbb"); + retval = "\xbb"; else if (code == 8869) - retval = std::string ("\x5e"); + retval = "\x5e"; else if (code == 8656) - retval = std::string ("\xdc"); + retval = "\xdc"; else if (code == 8592) - retval = std::string ("\xac"); + retval = "\xac"; else if (code == 8658) - retval = std::string ("\xde"); + retval = "\xde"; else if (code == 8594) - retval = std::string ("\xae"); + retval = "\xae"; else if (code == 8596) - retval = std::string ("\xab"); + retval = "\xab"; else if (code == 8593) - retval = std::string ("\xad"); + retval = "\xad"; else if (code == 8595) - retval = std::string ("\xaf"); + retval = "\xaf"; else if (code == 8970) - retval = std::string ("\xeb"); + retval = "\xeb"; else if (code == 8971) - retval = std::string ("\xfb"); + retval = "\xfb"; else if (code == 10216) - retval = std::string ("\xe1"); + retval = "\xe1"; else if (code == 10217) - retval = std::string ("\xf1"); + retval = "\xf1"; else if (code == 8968) - retval = std::string ("\xe9"); + retval = "\xe9"; else if (code == 8969) - retval = std::string ("\xf9"); + retval = "\xf9"; else if (code == 8800) - retval = std::string ("\xb9"); + retval = "\xb9"; else if (code == 8230) - retval = std::string ("\xbc"); + retval = "\xbc"; else if (code == 176) - retval = std::string ("\xb0"); + retval = "\xb0"; else if (code == 8709) - retval = std::string ("\xc6"); + retval = "\xc6"; else if (code == 169) - retval = std::string ("\xd3"); + retval = "\xd3"; if (retval.empty ()) warning ("print: unhandled symbol %d", code); @@ -700,7 +700,7 @@ { std::stringstream ss; ss << txtobj.get_code (); - str = "&#" + ss.str () + ";"; + str = "&#" + ss.str () + ';'; } } else
--- a/libinterp/corefcn/graphics.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/graphics.cc Fri Jul 28 15:40:00 2017 -0700 @@ -1228,14 +1228,14 @@ if (retval.empty ()) { if (val == default_value ()) - retval = "{" + val + "}"; + retval = '{' + val + '}'; else retval = val; } else { if (val == default_value ()) - retval += " | {" + val + "}"; + retval += " | {" + val + '}'; else retval += " | " + val; } @@ -7297,20 +7297,20 @@ os.str (""); if ((std::abs (significand) - 1) > 10*std::numeric_limits<double>::epsilon()) - os << significand << "x"; + os << significand << 'x'; else if (significand < 0) - os << "-"; + os << '-'; os << "10^{"; if (exponent < 0.0) { - os << "-"; + os << '-'; exponent = -exponent; } if (exponent < 10. && (exp_max > 9 || exp_min < -9)) - os << "0"; - os << exponent << "}"; + os << '0'; + os << exponent << '}'; c(i) = os.str (); } } @@ -7351,8 +7351,8 @@ if (limits(0) <= val && val <= limits(1)) { std::string label (ticklabels(i)); - label.erase (0, label.find_first_not_of (" ")); - label = label.substr (0, label.find_last_not_of (" ")+1); + label.erase (0, label.find_first_not_of (' ')); + label = label.substr (0, label.find_last_not_of (' ')+1); if (txt_renderer.ok ()) {
--- a/libinterp/corefcn/hook-fcn.h Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/hook-fcn.h Fri Jul 28 15:40:00 2017 -0700 @@ -158,7 +158,7 @@ std::ostringstream buf; buf << fh; - ident = fh->fcn_name () + ":" + buf.str (); + ident = fh->fcn_name () + ':' + buf.str (); } }
--- a/libinterp/corefcn/input.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/input.cc Fri Jul 28 15:40:00 2017 -0700 @@ -342,7 +342,7 @@ for (size_t i = 0; i < dirfns_commands_length; i++) { - int index = line.find (dirfns_commands[i] + " "); + int index = line.find (dirfns_commands[i] + ' '); if (index == 0) { @@ -428,7 +428,7 @@ // Special case: array reference forces prefix="." // in generate_struct_completions () if (list_index <= name_list_len && ! prefix.empty ()) - retval = (prefix == "." ? "" : prefix) + "." + name; + retval = (prefix == "." ? "" : prefix) + '.' + name; else retval = name; @@ -459,7 +459,7 @@ if (quote) return text; else - return (std::string ("'") + text); + return ("'" + text); } // Try to parse a partial command line in reverse, excluding trailing TEXT. @@ -580,7 +580,7 @@ { static char ctrl_z = 'Z' & 0x1f; - buf << ctrl_z << ctrl_z << nm << ":" << curr_debug_line; + buf << ctrl_z << ctrl_z << nm << ':' << curr_debug_line; } else {
--- a/libinterp/corefcn/load-path.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/load-path.cc Fri Jul 28 15:40:00 2017 -0700 @@ -921,7 +921,7 @@ std::string full_name = pkg_di.first; if (! pname.empty ()) - full_name = pname + "." + full_name; + full_name = pname + '.' + full_name; move (pkg_di.second, at_end, full_name); } @@ -996,7 +996,7 @@ std::string full_name = pkg_di.first; if (! pname.empty ()) - full_name = pname + "." + full_name; + full_name = pname + '.' + full_name; remove (pkg_di.second, full_name); } @@ -1029,7 +1029,7 @@ std::string full_name = pkg_di.first; if (! pname.empty ()) - full_name = pname + "." + full_name; + full_name = pname + '.' + full_name; add (pkg_di.second, at_end, full_name); } @@ -1607,7 +1607,7 @@ std::string class_name = cls_fnmap.first; if (! m_package_name.empty ()) - class_name = m_package_name + "." + class_name; + class_name = m_package_name + '.' + class_name; l.push_back (class_name); } @@ -1759,7 +1759,7 @@ fcn_map_type& fm = method_map[class_name]; std::string full_dir_name - = sys::file_ops::concat (dir_name, "@" + class_name); + = sys::file_ops::concat (dir_name, '@' + class_name); const dir_info::class_info& ci = cls_ci.second; @@ -1867,7 +1867,7 @@ fcn_map_type& fn_map = cls_fnmap.second; std::string full_dir_name - = sys::file_ops::concat (dir_name, "@" + class_name); + = sys::file_ops::concat (dir_name, '@' + class_name); for (auto& nm_filst : fn_map) { @@ -1958,7 +1958,7 @@ fcn_map_type& fn_map = cls_fnmap.second; std::string full_dir_name - = sys::file_ops::concat (dir, "@" + class_name); + = sys::file_ops::concat (dir, '@' + class_name); for (auto& nm_filst : fn_map) { @@ -2096,7 +2096,7 @@ if (types & load_path::MEX_FILE) { if (printed_type) - os << "|"; + os << '|'; os << "mex"; printed_type = true; } @@ -2104,8 +2104,8 @@ if (types & load_path::M_FILE) { if (printed_type) - os << "|"; - os << "m"; + os << '|'; + os << 'm'; printed_type = true; } }
--- a/libinterp/corefcn/load-save.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/load-save.cc Fri Jul 28 15:40:00 2017 -0700 @@ -115,9 +115,9 @@ std::string ("# Created by Octave " OCTAVE_VERSION ", %a %b %d %H:%M:%S %Y %Z <") + octave::sys::env::get_user_name () - + std::string ("@") + + '@' + octave::sys::env::get_host_name () - + std::string (">"); + + '>'; } // The format string for the comment line at the top of text-format @@ -500,7 +500,7 @@ { std::string fname = find_data_file_in_load_path ("load", name, true); - size_t dot_pos = fname.rfind ("."); + size_t dot_pos = fname.rfind ('.'); size_t sep_pos = fname.find_last_of (octave::sys::file_ops::dir_sep_chars ()); if (dot_pos == std::string::npos
--- a/libinterp/corefcn/ls-hdf5.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/ls-hdf5.cc Fri Jul 28 15:40:00 2017 -0700 @@ -551,7 +551,7 @@ else { if (int_sign == H5T_SGN_NONE) - int_typ.append ("u"); + int_typ.push_back ('u'); int_typ.append ("int"); int slen = H5Tget_size (type_id);
--- a/libinterp/corefcn/oct-hist.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/oct-hist.cc Fri Jul 28 15:40:00 2017 -0700 @@ -110,9 +110,9 @@ return std::string ("# Octave " OCTAVE_VERSION ", %a %b %d %H:%M:%S %Y %Z <") + octave::sys::env::get_user_name () - + std::string ("@") + + '@' + octave::sys::env::get_host_name () - + std::string (">"); + + '>'; } // The format of the timestamp marker written to the history file when
--- a/libinterp/corefcn/oct-stream.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/oct-stream.cc Fri Jul 28 15:40:00 2017 -0700 @@ -403,7 +403,7 @@ width = 0; discard = false; modifier = '\0'; - buf << " "; + buf << ' '; while (++i < n && isspace (s[i])) ; // skip whitespace @@ -5781,7 +5781,7 @@ if (elt->type == '%') { - os << "%"; + os << '%'; retval++; } else if (elt->args == 0 && elt->text)
--- a/libinterp/corefcn/pager.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/pager.cc Fri Jul 28 15:40:00 2017 -0700 @@ -116,7 +116,7 @@ // which would be bad news. std::cerr << "warning: connection to external pager lost (pid = " - << pid << ")" << std::endl; + << pid << ')' << std::endl; std::cerr << "warning: flushing pending output (please wait)" << std::endl; @@ -136,7 +136,7 @@ std::string cmd = VPAGER; if (! (cmd.empty () || VPAGER_FLAGS.empty ())) - cmd += " " + VPAGER_FLAGS; + cmd += ' ' + VPAGER_FLAGS; return cmd; }
--- a/libinterp/corefcn/pr-output.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/pr-output.cc Fri Jul 28 15:40:00 2017 -0700 @@ -404,7 +404,7 @@ std::ostringstream buf; buf.flags (std::ios::fixed); buf << std::setprecision (0) << static_cast<int>(n) - << "/" << static_cast<int>(d); + << '/' << static_cast<int>(d); m++; if (n < 0 && d < 0) @@ -431,7 +431,7 @@ std::ostringstream buf; buf.flags (std::ios::fixed); buf << std::setprecision (0) << static_cast<int>(lastn) - << "/" << static_cast<int>(lastd); + << '/' << static_cast<int>(lastd); s = buf.str (); } } @@ -481,7 +481,7 @@ (prf.f.fmt | prf.f.up | prf.f.sp)); if (fw > 0 && s.length () > static_cast<unsigned int>(fw)) - os << "*"; + os << '*'; else os << s; @@ -1588,7 +1588,7 @@ pr_imag_float (os, i, i_fw); } - os << "i"; + os << 'i'; } } @@ -1603,14 +1603,14 @@ if (nr == 0 && nc == 0) os << "[]"; else - os << "zeros (" << nr << ", " << nc << ")"; + os << "zeros (" << nr << ", " << nc << ')'; } else { os << "[]"; if (Vprint_empty_dimensions) - os << "(" << nr << "x" << nc << ")"; + os << '(' << nr << 'x' << nc << ')'; } } @@ -1621,13 +1621,13 @@ assert (dims.any_zero ()); if (pr_as_read_syntax) - os << "zeros (" << dims.str (',') << ")"; + os << "zeros (" << dims.str (',') << ')'; else { os << "[]"; if (Vprint_empty_dimensions) - os << "(" << dims.str () << ")"; + os << '(' << dims.str () << ')'; } } @@ -1766,7 +1766,7 @@ os << m; if (pr_as_read_syntax) - os << "]"; + os << ']'; return; } @@ -1902,7 +1902,7 @@ os << Matrix (m); if (pr_as_read_syntax) - os << "]"; + os << ']'; return; } @@ -1948,7 +1948,7 @@ else os << " ...\n"; } - os << ")"; + os << ')'; } else { @@ -2042,9 +2042,9 @@ buf << ra_idx(k) + 1; if (k < ndims - 1) - buf << ","; + buf << ','; else - buf << ")"; + buf << ')'; } nm += buf.str (); @@ -2105,14 +2105,14 @@ if (rp == 0.0) { if (ip == 0.0) - os << " "; + os << ' '; else - os << "i"; + os << 'i'; } else if (ip == 0.0) pr_plus_format (os, rp); else - os << "c"; + os << 'c'; } void @@ -2184,7 +2184,7 @@ os << cm; if (pr_as_read_syntax) - os << "]"; + os << ']'; return; } @@ -2322,7 +2322,7 @@ os << ComplexMatrix (cm); if (pr_as_read_syntax) - os << "]"; + os << ']'; return; } @@ -2368,7 +2368,7 @@ else os << " ...\n"; } - os << ")"; + os << ')'; } else { @@ -2467,7 +2467,7 @@ os << Matrix (m); if (pr_as_read_syntax) - os << "]"; + os << ']'; return; } @@ -2516,7 +2516,7 @@ else os << " ...\n"; } - os << ")"; + os << ')'; } else { @@ -2903,9 +2903,9 @@ buf << ra_idx(k) + 1; if (k < ndims - 1) - buf << ","; + buf << ','; else - buf << ")"; + buf << ')'; } nm += buf.str (); @@ -3168,9 +3168,9 @@ buf << ra_idx(k) + 1; if (k < ndims - 1) - buf << ","; + buf << ','; else - buf << ")"; + buf << ')'; } nm += buf.str (); @@ -3276,9 +3276,9 @@ buf << ra_idx(k) + 1; if (k < ndims - 1) - buf << ","; + buf << ','; else - buf << ")"; + buf << ')'; } nm += buf.str (); @@ -3315,7 +3315,7 @@ } if (pr_as_read_syntax) - os << "]"; + os << ']'; } else {
--- a/libinterp/corefcn/qz.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/qz.cc Fri Jul 28 15:40:00 2017 -0700 @@ -309,7 +309,7 @@ F77_INT nc = octave::to_f77_int (args(0).columns ()); #if defined (DEBUG) - std::cout << "Matrix A dimensions: (" << nn << "," << nc << ")" << std::endl; + std::cout << "Matrix A dimensions: (" << nn << ',' << nc << ')' << std::endl; #endif if (args(0).isempty ()) @@ -782,9 +782,9 @@ { for (F77_INT idc = j; idc <= j+1; idc++) { - std::cout << "aa(" << idr << "," << idc << ")=" + std::cout << "aa(" << idr << ',' << idc << ")=" << aa(idr,idc) << std::endl; - std::cout << "bb(" << idr << "," << idc << ")=" + std::cout << "bb(" << idr << ',' << idc << ")=" << bb(idr,idc) << std::endl; } }
--- a/libinterp/corefcn/symtab.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/symtab.cc Fri Jul 28 15:40:00 2017 -0700 @@ -1399,7 +1399,7 @@ { octave_value fcn; - std::string full_name = "@" + dispatch_type + + std::string full_name = '@' + dispatch_type + sys::file_ops::dir_sep_str () + name; size_t pos = full_name.find_first_of (Vfilemarker);
--- a/libinterp/corefcn/symtab.h Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/symtab.h Fri Jul 28 15:40:00 2017 -0700 @@ -708,7 +708,7 @@ if (package_name.empty ()) return name; else - return package_name + "." + name; + return package_name + '.' + name; } std::string name;
--- a/libinterp/corefcn/tril.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/corefcn/tril.cc Fri Jul 28 15:40:00 2017 -0700 @@ -286,7 +286,7 @@ idx_tmp.push_back (ov_idx); ov_idx(1) = static_cast<double> (nc); tmp = tmp.resize (dim_vector (0,0)); - tmp = tmp.subsasgn ("(",idx_tmp, arg.do_index_op (ov_idx)); + tmp = tmp.subsasgn ("(", idx_tmp, arg.do_index_op (ov_idx)); tmp = tmp.resize (dims); if (lower)
--- a/libinterp/dldfcn/__delaunayn__.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/dldfcn/__delaunayn__.cc Fri Jul 28 15:40:00 2017 -0700 @@ -133,7 +133,7 @@ Array<std::string> tmp = args(1).cellstr_value (); for (octave_idx_type i = 0; i < tmp.numel (); i++) - options += tmp(i) + " "; + options += tmp(i) + ' '; } else error ("__delaunayn__: OPTIONS argument must be a string, cell array of strings, or empty");
--- a/libinterp/dldfcn/__init_fltk__.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/dldfcn/__init_fltk__.cc Fri Jul 28 15:40:00 2017 -0700 @@ -148,7 +148,7 @@ void print (const std::string& cmd, const std::string& term) { - //std::cout << "OpenGL_fltk::print(cmd=" << cmd << ", term=" << term << ") canvas size = " << w () << "x" << h () << std::endl; + //std::cout << "OpenGL_fltk::print(cmd=" << cmd << ", term=" << term << ") canvas size = " << w () << 'x' << h () << std::endl; octave::gl2ps_print (gh_manager::get_object (m_number), cmd, term); } @@ -380,7 +380,7 @@ // End of submenu? Pop back one level. if (! m->label ()) { - size_t idx = menupath.find_last_of ("/"); + size_t idx = menupath.find_last_of ('/'); if (idx != std::string::npos) menupath.erase (idx); else @@ -600,8 +600,8 @@ if (item) { //avoid duplicate menulabels - size_t idx1 = fltk_label.find_last_of ("("); - size_t idx2 = fltk_label.find_last_of (")"); + size_t idx1 = fltk_label.find_last_of ('('); + size_t idx2 = fltk_label.find_last_of (')'); int len = idx2 - idx1; int val = 1; if (len > 0) @@ -614,7 +614,7 @@ } std::ostringstream valstream; valstream << val; - fltk_label += "(" + valstream.str () + ")"; + fltk_label += '(' + valstream.str () + ')'; } else { @@ -1242,11 +1242,11 @@ cbuf.precision (4); cbuf.width (6); pixel2pos (ax, px0, py0, x0, y0); - cbuf << "[" << x0 << ", " << y0 << "]"; + cbuf << '[' << x0 << ", " << y0 << ']'; if (px1 >= 0) { pixel2pos (ax, px1, py1, x1, y1); - cbuf << " -> ["<< x1 << ", " << y1 << "]"; + cbuf << " -> ["<< x1 << ", " << y1 << ']'; } m_status->value (cbuf.str ().c_str ()); @@ -1263,7 +1263,7 @@ cbuf.width (6); Matrix v (1,2,0); v = ap.get ("view").matrix_value (); - cbuf << "[azimuth: " << v(0) << ", elevation: " << v(1) << "]"; + cbuf << "[azimuth: " << v(0) << ", elevation: " << v(1) << ']'; m_status->value (cbuf.str ().c_str ()); } @@ -1393,7 +1393,7 @@ } else if (e_key >= (FL_F + 1) && e_key <= (FL_F + 12)) { - tmp_str << "f" << (e_key - FL_F); + tmp_str << 'f' << (e_key - FL_F); key_str = tmp_str.str (); } else if (e_key == ',') @@ -2299,7 +2299,7 @@ if (go.isa ("uimenu")) fltk_label = dynamic_cast<const uimenu::properties&> (go.get_properties ()).get___fltk_label__ () - + "/" + + '/' + fltk_label; else if (go.isa ("figure") || go.isa ("uicontextmenu")) ;
--- a/libinterp/dldfcn/__voronoi__.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/dldfcn/__voronoi__.cc Fri Jul 28 15:40:00 2017 -0700 @@ -123,7 +123,7 @@ octave_value opt_arg = args(2); if (opt_arg.is_string ()) - options = " " + opt_arg.string_value (); + options = ' ' + opt_arg.string_value (); else if (opt_arg.isempty ()) ; // Use default options. else if (opt_arg.iscellstr ()) @@ -133,7 +133,7 @@ Array<std::string> tmp = opt_arg.cellstr_value (); for (octave_idx_type i = 0; i < tmp.numel (); i++) - options += " " + tmp(i); + options += ' ' + tmp(i); } else error ("%s: OPTIONS must be a string, cell array of strings, or empty",
--- a/libinterp/dldfcn/audioread.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/dldfcn/audioread.cc Fri Jul 28 15:40:00 2017 -0700 @@ -293,7 +293,7 @@ int samplerate = args(2).int_value (); std::string ext; - size_t dotpos = filename.find_last_of ("."); + size_t dotpos = filename.find_last_of ('.'); if (dotpos != std::string::npos) ext = filename.substr (dotpos + 1); std::transform (ext.begin (), ext.end (), ext.begin (), ::tolower);
--- a/libinterp/dldfcn/ccolamd.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/dldfcn/ccolamd.cc Fri Jul 28 15:40:00 2017 -0700 @@ -169,7 +169,7 @@ // print knob settings if spumoni is set if (spumoni) { - octave_stdout << "\nccolamd version " << CCOLAMD_MAIN_VERSION << "." + octave_stdout << "\nccolamd version " << CCOLAMD_MAIN_VERSION << '.' << CCOLAMD_SUB_VERSION << ", " << CCOLAMD_DATE << ":\nknobs(1): " << User_knobs(0) << ", order for "; if (knobs[CCOLAMD_LU] != 0) @@ -431,7 +431,7 @@ if (spumoni) { octave_stdout << "\ncsymamd version " << CCOLAMD_MAIN_VERSION - << "." << CCOLAMD_SUB_VERSION + << '.' << CCOLAMD_SUB_VERSION << ", " << CCOLAMD_DATE << "\n"; if (knobs[CCOLAMD_DENSE_ROW] >= 0)
--- a/libinterp/dldfcn/colamd.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/dldfcn/colamd.cc Fri Jul 28 15:40:00 2017 -0700 @@ -303,7 +303,7 @@ { octave_stdout << "\ncolamd version " << COLAMD_MAIN_VERSION - << "." << COLAMD_SUB_VERSION + << '.' << COLAMD_SUB_VERSION << ", " << COLAMD_DATE << ":\n"; if (knobs[COLAMD_DENSE_ROW] >= 0) @@ -702,7 +702,7 @@ if (nargin == 2) { std::string str = args(1).xstring_value ("etree: TYP must be a string"); - if (str.find ("C") == 0 || str.find ("c") == 0) + if (str.find ('C') == 0 || str.find ('c') == 0) is_sym = false; }
--- a/libinterp/dldfcn/convhulln.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/dldfcn/convhulln.cc Fri Jul 28 15:40:00 2017 -0700 @@ -140,7 +140,7 @@ if (nargin == 2) { if (args(1).is_string ()) - options = " " + args(1).string_value (); + options = ' ' + args(1).string_value (); else if (args(1).isempty ()) ; // Use default options. else if (args(1).iscellstr ()) @@ -150,7 +150,7 @@ Array<std::string> tmp = args(1).cellstr_value (); for (octave_idx_type i = 0; i < tmp.numel (); i++) - options += " " + tmp(i); + options += ' ' + tmp(i); } else error ("convhulln: OPTIONS must be a string, cell array of strings, or empty");
--- a/libinterp/octave-value/ov-base-int.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-base-int.cc Fri Jul 28 15:40:00 2017 -0700 @@ -273,7 +273,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i = 0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n" << this->matrix;
--- a/libinterp/octave-value/ov-base-mat.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-base-mat.cc Fri Jul 28 15:40:00 2017 -0700 @@ -471,7 +471,7 @@ octave_idx_type nr = matrix.rows (); octave_idx_type nc = matrix.columns (); - os << "["; + os << '['; for (octave_idx_type i = 0; i < nr; i++) { @@ -480,7 +480,7 @@ std::ostringstream buf; octave_print_internal (buf, matrix(j*nr+i)); std::string tmp = buf.str (); - size_t pos = tmp.find_first_not_of (" "); + size_t pos = tmp.find_first_not_of (' '); if (pos != std::string::npos) os << tmp.substr (pos); else if (! tmp.empty ()) @@ -500,7 +500,7 @@ done: if (nel <= max_elts) - os << "]"; + os << ']'; } else os << "...";
--- a/libinterp/octave-value/ov-base-scalar.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-base-scalar.cc Fri Jul 28 15:40:00 2017 -0700 @@ -181,7 +181,7 @@ std::ostringstream buf; octave_print_internal (buf, scalar); std::string tmp = buf.str (); - size_t pos = tmp.find_first_not_of (" "); + size_t pos = tmp.find_first_not_of (' '); if (pos != std::string::npos) os << tmp.substr (pos); else if (! tmp.empty ())
--- a/libinterp/octave-value/ov-base.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-base.cc Fri Jul 28 15:40:00 2017 -0700 @@ -249,7 +249,7 @@ idx_vector octave_base_value::index_vector (bool /* require_integers */) const { - std::string nm = "<" + type_name () + ">"; + std::string nm = '<' + type_name () + '>'; octave::err_invalid_index (nm.c_str ()); } @@ -1346,7 +1346,7 @@ // os << prefix; for (int i = 0; i < curr_print_indent_level; i++) - os << " "; + os << ' '; beginning_of_line = false; }
--- a/libinterp/octave-value/ov-bool-mat.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-bool-mat.cc Fri Jul 28 15:40:00 2017 -0700 @@ -241,7 +241,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i = 0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n" << tmp; }
--- a/libinterp/octave-value/ov-cell.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-cell.cc Fri Jul 28 15:40:00 2017 -0700 @@ -648,7 +648,7 @@ if (nr > 0 && nc > 0) { indent (os); - os << "{"; + os << '{'; newline (os); increment_indent_level (); @@ -660,7 +660,7 @@ octave_quit (); std::ostringstream buf; - buf << "[" << i+1 << "," << j+1 << "]"; + buf << '[' << i+1 << ',' << j+1 << ']'; octave_value val = matrix(i,j); @@ -671,7 +671,7 @@ decrement_indent_level (); indent (os); - os << "}"; + os << '}'; newline (os); } else @@ -679,7 +679,7 @@ indent (os); os << "{}"; if (Vprint_empty_dimensions) - os << "(" << nr << "x" << nc << ")"; + os << '(' << nr << 'x' << nc << ')'; newline (os); } } @@ -687,7 +687,7 @@ { indent (os); dim_vector dv = matrix.dims (); - os << "{" << dv.str () << " Cell Array}"; + os << '{' << dv.str () << " Cell Array}"; newline (os); } } @@ -728,7 +728,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i = 0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n"; Cell tmp = cell_value (); @@ -1059,7 +1059,7 @@ std::ostringstream buf; int digits = static_cast<int> (std::floor (::log10 (static_cast<double> (nel)) + 1.0)); - buf << "_" << std::setw (digits) << std::setfill ('0') << i; + buf << '_' << std::setw (digits) << std::setfill ('0') << i; std::string s = buf.str (); if (! add_hdf5_data (data_hid, tmp.elem (i), s.c_str (), "", false,
--- a/libinterp/octave-value/ov-class.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-class.cc Fri Jul 28 15:40:00 2017 -0700 @@ -1013,7 +1013,7 @@ octave::unwind_protect frame; indent (os); - os << " <class " << class_name () << ">"; + os << " <class " << class_name () << '>'; newline (os); }
--- a/libinterp/octave-value/ov-classdef.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-classdef.cc Fri Jul 28 15:40:00 2017 -0700 @@ -977,7 +977,7 @@ os << "<object "; if (object.is_array ()) os << "array "; - os << class_name () << ">"; + os << class_name () << '>'; newline (os); } @@ -2536,7 +2536,7 @@ class_name = full_class_name = t->ident ()->name (); if (! t->package_name ().empty ()) - full_class_name = t->package_name () + "." + full_class_name; + full_class_name = t->package_name () + '.' + full_class_name; #if DEBUG_TRACE std::cerr << "class: " << full_class_name << std::endl; @@ -2653,10 +2653,10 @@ if (mprefix == "get.") get_methods[mname.substr (4)] = - make_fcn_handle (mtd, full_class_name + ">" + mname); + make_fcn_handle (mtd, full_class_name + '>' + mname); else if (mprefix == "set.") set_methods[mname.substr (4)] = - make_fcn_handle (mtd, full_class_name + ">" + mname); + make_fcn_handle (mtd, full_class_name + '>' + mname); else { cdef_method meth = make_method (retval, mname, mtd); @@ -3256,7 +3256,7 @@ octave_value cdef_package::cdef_package_rep::find (const std::string& nm) { - std::string symbol_name = get_name () + "." + nm; + std::string symbol_name = get_name () + '.' + nm; octave::symbol_table& symtab = octave::__get_symbol_table__ ("cdef_package::cdef_package_rep::find"); @@ -3816,7 +3816,7 @@ { #if DEBUG_TRACE std::cerr << "__meta_class_query__ (" - << args(0).string_value () << ")" + << args(0).string_value () << ')' << std::endl; #endif
--- a/libinterp/octave-value/ov-colon.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-colon.cc Fri Jul 28 15:40:00 2017 -0700 @@ -44,5 +44,5 @@ void octave_magic_colon::print_raw (std::ostream& os, bool) const { - os << ":"; + os << ':'; }
--- a/libinterp/octave-value/ov-complex.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-complex.cc Fri Jul 28 15:40:00 2017 -0700 @@ -139,7 +139,7 @@ octave_complex::index_vector (bool) const { std::ostringstream buf; - buf << scalar.real () << std::showpos << scalar.imag () << "i"; + buf << scalar.real () << std::showpos << scalar.imag () << 'i'; octave::complex_index_exception e (buf.str ()); throw e;
--- a/libinterp/octave-value/ov-cx-mat.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-cx-mat.cc Fri Jul 28 15:40:00 2017 -0700 @@ -324,7 +324,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i = 0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n" << tmp; }
--- a/libinterp/octave-value/ov-fcn-handle.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-fcn-handle.cc Fri Jul 28 15:40:00 2017 -0700 @@ -528,7 +528,7 @@ size_t varlen = vars.size (); if (varlen > 0) - nmbuf << nm << " " << varlen; + nmbuf << nm << ' ' << varlen; else nmbuf << nm; @@ -1472,7 +1472,7 @@ } if (! printed) - octave_print_internal (os, "@" + nm, pr_as_read_syntax, + octave_print_internal (os, '@' + nm, pr_as_read_syntax, current_print_indent_level ()); }
--- a/libinterp/octave-value/ov-fcn-inline.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-fcn-inline.cc Fri Jul 28 15:40:00 2017 -0700 @@ -643,7 +643,7 @@ if (nm.empty ()) buf << "f("; else - buf << nm << "("; + buf << nm << '('; for (int i = 0; i < ifargs.numel (); i++) { @@ -785,7 +785,7 @@ } } - // Sort the arguments into ascii order. + // Sort the arguments into ASCII order. fargs.sort (); if (fargs.isempty ()) @@ -809,7 +809,7 @@ for (int i = 1; i < n+1; i++) { std::ostringstream buf; - buf << "P" << i; + buf << 'P' << i; fargs(i) = buf.str (); } } @@ -962,13 +962,13 @@ if (t1 == "*" || t1 == "/" || t1 == "\\" || t1 == "^") { if (i && old_func.substr (i-1, 1) != ".") - new_func.append ("."); + new_func += '.'; // Special case for ** operator. if (t1 == "*" && i < (old_func.length () - 1) && old_func.substr (i+1, 1) == "*") { - new_func.append ("*"); + new_func += '*'; i++; } }
--- a/libinterp/octave-value/ov-fcn.h Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-fcn.h Fri Jul 28 15:40:00 2017 -0700 @@ -186,7 +186,7 @@ if (xpackage_name.empty ()) return my_name; else - return xpackage_name + "." + my_name; + return xpackage_name + '.' + my_name; } void document (const std::string& ds) { doc = ds; }
--- a/libinterp/octave-value/ov-flt-cx-mat.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-flt-cx-mat.cc Fri Jul 28 15:40:00 2017 -0700 @@ -298,7 +298,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i = 0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n" << tmp; }
--- a/libinterp/octave-value/ov-flt-re-mat.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-flt-re-mat.cc Fri Jul 28 15:40:00 2017 -0700 @@ -375,7 +375,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i=0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n" << tmp; }
--- a/libinterp/octave-value/ov-java.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-java.cc Fri Jul 28 15:40:00 2017 -0700 @@ -225,7 +225,7 @@ { std::getline (js, line); - if (line.find ("-") == 0) + if (line.find ('-') == 0) java_opts.push_back (line); else if (line.length () > 0 && Vdebug_java) std::cerr << "invalid JVM option, skipping: " << line << std::endl; @@ -437,7 +437,7 @@ { std::string filename = cp_list[i]; std::string cp_file = filename; - octave::sys::file_stat cp_exists; + octave::sys::file_stat cp_exists; // Try to find classpath file in the current directory. @@ -453,7 +453,7 @@ if (cwd != home_dir) { - cp_file = "~" + sep + filename; + cp_file = '~' + sep + filename; cp_file = octave::sys::file_ops::tilde_expand (cp_file); cp_exists = octave::sys::file_stat (cp_file); if (cp_exists) @@ -2172,7 +2172,7 @@ void octave_java::print_raw (std::ostream& os, bool) const { - os << "<Java object: " << java_classname << ">"; + os << "<Java object: " << java_classname << '>'; } // FIXME: Need routines to actually save/load java objects through Serialize.
--- a/libinterp/octave-value/ov-oncleanup.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-oncleanup.cc Fri Jul 28 15:40:00 2017 -0700 @@ -180,7 +180,7 @@ os << "onCleanup ("; if (fcn.is_defined ()) fcn.print_raw (os, pr_as_read_syntax); - os << ")"; + os << ')'; } DEFUN (onCleanup, args, ,
--- a/libinterp/octave-value/ov-range.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-range.cc Fri Jul 28 15:40:00 2017 -0700 @@ -472,12 +472,12 @@ os << "[]"; else { - os << range.base () << ":"; + os << range.base () << ':'; if (len > 1) { if (range.inc () != 1) - os << range.inc () << ":"; + os << range.inc () << ':'; os << range.limit (); } @@ -516,12 +516,12 @@ os << "# base, length, increment\n"; octave_write_double (os, base); - os << " "; + os << ' '; if (inc != 0) octave_write_double (os, limit); else os << len; - os << " "; + os << ' '; octave_write_double (os, inc); os << "\n";
--- a/libinterp/octave-value/ov-re-mat.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-re-mat.cc Fri Jul 28 15:40:00 2017 -0700 @@ -477,7 +477,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i=0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n" << tmp; }
--- a/libinterp/octave-value/ov-re-sparse.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-re-sparse.cc Fri Jul 28 15:40:00 2017 -0700 @@ -61,7 +61,7 @@ return idx_vector (array_value ()); else { - std::string nm = "<" + type_name () + ">"; + std::string nm = '<' + type_name () + '>'; octave::err_invalid_index (nm.c_str ()); } }
--- a/libinterp/octave-value/ov-str-mat.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-str-mat.cc Fri Jul 28 15:40:00 2017 -0700 @@ -286,7 +286,7 @@ charNDArray tmp = char_array_value (); os << "# ndims: " << dv.ndims () << "\n"; for (int i=0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n"; os.write (tmp.fortran_vec (), dv.numel ()); os << "\n";
--- a/libinterp/octave-value/ov-struct.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-struct.cc Fri Jul 28 15:40:00 2017 -0700 @@ -666,7 +666,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i = 0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n"; os << "# length: " << nf << "\n"; @@ -1288,7 +1288,7 @@ indent (os); os << key; dim_vector dv = val.dims (); - os << ": " << dv.str () << " " << val.type_name (); + os << ": " << dv.str () << ' ' << val.type_name (); newline (os); } else @@ -1341,7 +1341,7 @@ os << "# ndims: " << dv.ndims () << "\n"; for (int i = 0; i < dv.ndims (); i++) - os << " " << dv(i); + os << ' ' << dv(i); os << "\n"; os << "# length: " << nf << "\n";
--- a/libinterp/octave-value/ov-usr-fcn.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov-usr-fcn.cc Fri Jul 28 15:40:00 2017 -0700 @@ -370,16 +370,16 @@ if (is_anonymous_function ()) result << "anonymous@" << fcn_file_name () - << ":" << location_line << ":" << location_column; + << ':' << location_line << ':' << location_column; else if (is_subfunction ()) - result << parent_fcn_name () << ">" << name (); + result << parent_fcn_name () << '>' << name (); else if (is_class_method ()) - result << "@" << dispatch_class () << "/" << name (); + result << '@' << dispatch_class () << '/' << name (); else if (is_class_constructor () || is_classdef_constructor ()) - result << "@" << name (); + result << '@' << name (); else if (is_inline_function ()) result << "inline@" << fcn_file_name () - << ":" << location_line << ":" << location_column; + << ':' << location_line << ':' << location_column; else result << name ();
--- a/libinterp/octave-value/ov.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave-value/ov.cc Fri Jul 28 15:40:00 2017 -0700 @@ -2562,7 +2562,7 @@ << prefix << "count: " << get_count () << "\n" << prefix << "rep info: "; - rep->print_info (os, prefix + " "); + rep->print_info (os, prefix + ' '); } OCTAVE_NORETURN static void
--- a/libinterp/octave.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/octave.cc Fri Jul 28 15:40:00 2017 -0700 @@ -144,7 +144,7 @@ if (m_code_to_eval.empty ()) m_code_to_eval = octave_optarg_wrapper (); else - m_code_to_eval += std::string (" ") + octave_optarg_wrapper (); + m_code_to_eval += ' ' + octave_optarg_wrapper (); } break;
--- a/libinterp/parse-tree/bp-table.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/bp-table.cc Fri Jul 28 15:40:00 2017 -0700 @@ -439,7 +439,7 @@ for (; pos < nargin; pos++) { if (args(pos).is_string ()) - cond = cond + " " + args(pos).string_value (); + cond = cond + ' ' + args(pos).string_value (); else error ("%s: arguments to 'if' must all be strings", who); }
--- a/libinterp/parse-tree/jit-ir.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/jit-ir.cc Fri Jul 28 15:40:00 2017 -0700 @@ -219,7 +219,7 @@ { if (type ()) jit_print (os, type ()) << ": "; - return os << "#" << mid; + return os << '#' << mid; } void @@ -402,12 +402,12 @@ os << " mid: " << mid << std::endl; os << " predecessors: "; for (jit_use *use = first_use (); use; use = use->next ()) - os << *use->user_parent () << " "; + os << *use->user_parent () << ' '; os << std::endl; os << " successors: "; for (size_t i = 0; i < successor_count (); ++i) - os << *successor (i) << " "; + os << *successor (i) << ' '; os << std::endl; os << " idom: "; @@ -418,12 +418,12 @@ os << std::endl; os << " df: "; for (df_iterator iter = df_begin (); iter != df_end (); ++iter) - os << **iter << " "; + os << **iter << ' '; os << std::endl; os << " dom_succ: "; for (size_t i = 0; i < dom_succ.size (); ++i) - os << *dom_succ[i] << " "; + os << *dom_succ[i] << ' '; return os << std::endl; } @@ -832,7 +832,7 @@ { context ctx = resolve_context (); short_print (print_indent (os, indent)) << " (" << *ctx.value << ", "; - return os << *ctx.index << ", " << *ctx.count << ")"; + return os << *ctx.index << ", " << *ctx.count << ')'; } const jit_function&
--- a/libinterp/parse-tree/jit-ir.h Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/jit-ir.h Fri Jul 28 15:40:00 2017 -0700 @@ -274,7 +274,7 @@ std::ostream& print_indent (std::ostream& os, size_t indent = 0) const { for (size_t i = 0; i < indent * 8; ++i) - os << " "; + os << ' '; return os; } @@ -536,10 +536,10 @@ print_indent (os, indent); jit_print (os, type ()) << ": "; if (QUOTE) - os << R"(")"; + os << '"'; os << mvalue; if (QUOTE) - os << R"(")"; + os << '"'; return os; } @@ -723,7 +723,7 @@ if (mid != NO_ID) os << mid; else - os << "!"; + os << '!'; return os; } @@ -901,7 +901,7 @@ jit_print (os, type ()) << ": "; dest ()->short_print (os); - return os << "#" << id (); + return os << '#' << id (); } private: jit_variable *mdest; @@ -1202,7 +1202,7 @@ if (i + 1 < argument_count ()) os << ", "; } - return os << ")"; + return os << ')'; } virtual bool infer (void); @@ -1294,7 +1294,7 @@ virtual std::ostream& short_print (std::ostream& os) const { - return os << "magic_end" << "#" << id (); + return os << "magic_end" << '#' << id (); } JIT_VALUE_ACCEPT; @@ -1409,7 +1409,7 @@ print_indent (os, indent) << "return"; if (result ()) - os << " " << *result (); + os << ' ' << *result (); return os; }
--- a/libinterp/parse-tree/jit-typeinfo.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/jit-typeinfo.cc Fri Jul 28 15:40:00 2017 -0700 @@ -488,7 +488,7 @@ operator<< (std::ostream& os, const jit_range& rng) { return os << "Range[" << rng.base << ", " << rng.limit << ", " << rng.inc - << ", " << rng.nelem << "]"; + << ", " << rng.nelem << ']'; } // -------------------- jit_matrix -------------------- @@ -498,7 +498,7 @@ { return os << "Matrix[" << mat.ref_count << ", " << mat.slice_data << ", " << mat.slice_len << ", " << mat.dimensions << ", " - << mat.array << "]"; + << mat.array << ']'; } // -------------------- jit_type -------------------- @@ -1901,7 +1901,7 @@ std::stringstream fname; octave_value::binary_op ov_op = static_cast<octave_value::binary_op>(op); fname << "octave_jit_" << octave_value::binary_op_as_string (ov_op) - << "_" << ty->name (); + << '_' << ty->name (); jit_function fn = create_internal (fname.str (), ty, ty, ty); llvm::BasicBlock *block = fn.new_block (); @@ -1921,7 +1921,7 @@ std::stringstream fname; octave_value::binary_op ov_op = static_cast<octave_value::binary_op>(op); fname << "octave_jit" << octave_value::binary_op_as_string (ov_op) - << "_" << ty->name (); + << '_' << ty->name (); jit_function fn = create_internal (fname.str (), boolean, ty, ty); llvm::BasicBlock *block = fn.new_block (); @@ -1940,7 +1940,7 @@ std::stringstream fname; octave_value::binary_op ov_op = static_cast<octave_value::binary_op>(op); fname << "octave_jit" << octave_value::binary_op_as_string (ov_op) - << "_" << ty->name (); + << '_' << ty->name (); jit_function fn = create_internal (fname.str (), boolean, ty, ty); llvm::BasicBlock *block = fn.new_block ();
--- a/libinterp/parse-tree/pt-funcall.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/pt-funcall.cc Fri Jul 28 15:40:00 2017 -0700 @@ -63,7 +63,7 @@ os << ", "; } - os << ")"; + os << ')'; } }
--- a/libinterp/parse-tree/pt-idx.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/pt-idx.cc Fri Jul 28 15:40:00 2017 -0700 @@ -90,7 +90,7 @@ tree_index_expression::append (const std::string& n) { args.push_back (static_cast<tree_argument_list *> (nullptr)); - type.append ("."); + type += '.'; arg_nm.push_back (n); dyn_field.push_back (static_cast<tree_expression *> (nullptr)); } @@ -99,7 +99,7 @@ tree_index_expression::append (tree_expression *df) { args.push_back (static_cast<tree_argument_list *> (nullptr)); - type.append ("."); + type += '.'; arg_nm.push_back (""); dyn_field.push_back (df); }
--- a/libinterp/parse-tree/pt-pr-code.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/pt-pr-code.cc Fri Jul 28 15:40:00 2017 -0700 @@ -88,7 +88,7 @@ if (op1) op1->accept (*this); - os << " " << expr.oper () << " "; + os << ' ' << expr.oper () << ' '; tree_expression *op2 = expr.rhs (); @@ -124,7 +124,7 @@ if (op3) { - os << ":"; + os << ':'; op3->accept (*this); } @@ -132,7 +132,7 @@ if (op2) { - os << ":"; + os << ':'; op2->accept (*this); } @@ -152,7 +152,7 @@ { indent (); - os << cmd.name () << " "; + os << cmd.name () << ' '; tree_decl_init_list *init_list = cmd.initializer_list (); @@ -211,7 +211,7 @@ tree_expression *maxproc = cmd.maxproc_expr (); if (maxproc) - os << "("; + os << '('; if (lhs) lhs->accept (*this); @@ -227,7 +227,7 @@ { os << ", "; maxproc->accept (*this); - os << ")"; + os << ')'; } newline (); @@ -350,7 +350,7 @@ if (len > 1 || takes_var_return) { - os << "["; + os << '['; nesting.push ('['); } @@ -367,7 +367,7 @@ if (len > 1 || takes_var_return) { nesting.pop (); - os << "]"; + os << ']'; } os << " = "; @@ -375,7 +375,7 @@ std::string fcn_name = fcn.name (); - os << (fcn_name.empty () ? std::string ("(empty)") : fcn_name) << " "; + os << (fcn_name.empty () ? std::string ("(empty)") : fcn_name) << ' '; tree_parameter_list *param_list = fcn.parameter_list (); @@ -387,7 +387,7 @@ if (len > 0 || takes_varargs) { - os << "("; + os << '('; nesting.push ('('); } @@ -404,7 +404,7 @@ if (len > 0 || takes_varargs) { nesting.pop (); - os << ")"; + os << ')'; newline (); } } @@ -553,7 +553,7 @@ { char nc = nesting.top (); if ((nc == '[' || nc == '{') && expr.paren_count () == 0) - os << "("; + os << '('; else os << " ("; nesting.push ('('); @@ -563,7 +563,7 @@ l->accept (*this); nesting.pop (); - os << ")"; + os << ')'; } break; @@ -571,7 +571,7 @@ { char nc = nesting.top (); if ((nc == '[' || nc == '{') && expr.paren_count () == 0) - os << "{"; + os << '{'; else os << " {"; // We only care about whitespace inside [] and {} when we @@ -583,7 +583,7 @@ l->accept (*this); nesting.pop (); - os << "}"; + os << '}'; } break; @@ -591,7 +591,7 @@ { string_vector nm = *p_arg_names; assert (nm.numel () == 1); - os << "." << nm(0); + os << '.' << nm(0); } break; @@ -613,7 +613,7 @@ print_parens (lst, "("); - os << "["; + os << '['; nesting.push ('['); tree_matrix::iterator p = lst.begin (); @@ -632,7 +632,7 @@ } nesting.pop (); - os << "]"; + os << ']'; print_parens (lst, ")"); } @@ -644,7 +644,7 @@ print_parens (lst, "("); - os << "{"; + os << '{'; nesting.push ('{'); tree_cell::iterator p = lst.begin (); @@ -663,7 +663,7 @@ } nesting.pop (); - os << "}"; + os << '}'; print_parens (lst, ")"); } @@ -683,7 +683,7 @@ if (len > 1) { - os << "["; + os << '['; nesting.push ('['); } @@ -692,11 +692,11 @@ if (len > 1) { nesting.pop (); - os << "]"; + os << ']'; } } - os << " " << expr.oper () << " "; + os << ' ' << expr.oper () << ' '; tree_expression *rhs = expr.right_hand_side (); @@ -845,7 +845,7 @@ if (lhs) lhs->accept (*this); - os << " " << expr.oper () << " "; + os << ' ' << expr.oper () << ' '; tree_expression *rhs = expr.right_hand_side (); @@ -878,7 +878,7 @@ if (! stmt.print_result ()) { - os << ";"; + os << ';'; newline (" "); } else @@ -1009,7 +1009,7 @@ if (expr_id) { - os << " "; + os << ' '; expr_id->accept (*this); } @@ -1264,7 +1264,7 @@ os << "##"; if (! (isspace (c) || c == '!')) - os << " "; + os << ' '; } os << static_cast<char> (c);
--- a/libinterp/parse-tree/pt.h Fri Jul 28 11:45:07 2017 -0700 +++ b/libinterp/parse-tree/pt.h Fri Jul 28 15:40:00 2017 -0700 @@ -84,7 +84,7 @@ // breakpoint condition, or "0" (i.e., "false") if no breakpoint. // To distinguish "0" from a disabled breakpoint, test "is_breakpoint" too. const std::string bp_cond (void) const - { return bp ? *bp : std::string("0"); } + { return bp ? *bp : "0"; } std::string str_print_code (void);
--- a/liboctave/array/Array.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/Array.cc Fri Jul 28 15:40:00 2017 -0700 @@ -2782,7 +2782,7 @@ os << n_dims << "-dimensional array"; if (n_dims) - os << " (" << a_dims.str () << ")"; + os << " (" << a_dims.str () << ')'; os <<"\n\n"; @@ -2815,7 +2815,7 @@ for (octave_idx_type k = 0; k < cols; k++) { ra_idx(1) = k; - os << " " << a.elem (ra_idx); + os << ' ' << a.elem (ra_idx); } os << "\n"; } @@ -2827,7 +2827,7 @@ for (octave_idx_type k = 0; k < rows; k++) { ra_idx(0) = k; - os << " " << a.elem (ra_idx); + os << ' ' << a.elem (ra_idx); } break; } @@ -2844,7 +2844,7 @@ os << "\n(:,:,"; for (int j = 2; j < n_dims - 1; j++) - os << ra_idx(j) + 1 << ","; + os << ra_idx(j) + 1 << ','; os << ra_idx(n_dims - 1) + 1 << ") = \n"; @@ -2855,7 +2855,7 @@ for (octave_idx_type k = 0; k < cols; k++) { ra_idx(1) = k; - os << " " << a.elem (ra_idx); + os << ' ' << a.elem (ra_idx); } os << "\n";
--- a/liboctave/array/CDiagMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/CDiagMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -502,9 +502,9 @@ for (octave_idx_type j = 0; j < a.cols (); j++) { if (i == j) - os << " " /* setw (field_width) */ << a.elem (i, i); + os << ' ' /* setw (field_width) */ << a.elem (i, i); else - os << " " /* setw (field_width) */ << ZERO; + os << ' ' /* setw (field_width) */ << ZERO; } os << "\n"; }
--- a/liboctave/array/CMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/CMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -3332,7 +3332,7 @@ { for (octave_idx_type j = 0; j < a.cols (); j++) { - os << " "; + os << ' '; octave_write_complex (os, a.elem (i, j)); } os << "\n";
--- a/liboctave/array/CNDArray.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/CNDArray.cc Fri Jul 28 15:40:00 2017 -0700 @@ -835,7 +835,7 @@ for (octave_idx_type i = 0; i < nel; i++) { - os << " "; + os << ' '; octave_write_complex (os, a.elem (i)); os << "\n"; }
--- a/liboctave/array/CRowVector.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/CRowVector.cc Fri Jul 28 15:40:00 2017 -0700 @@ -365,7 +365,7 @@ { // int field_width = os.precision () + 7; for (octave_idx_type i = 0; i < a.numel (); i++) - os << " " /* setw (field_width) */ << a.elem (i); + os << ' ' /* setw (field_width) */ << a.elem (i); return os; }
--- a/liboctave/array/CSparse.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/CSparse.cc Fri Jul 28 15:40:00 2017 -0700 @@ -5785,8 +5785,8 @@ CHOLMOD_NAME(free_dense) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -6053,8 +6053,8 @@ CHOLMOD_NAME(free_sparse) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -6338,8 +6338,8 @@ CHOLMOD_NAME(free_dense) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -6585,8 +6585,8 @@ CHOLMOD_NAME(free_sparse) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -7472,7 +7472,7 @@ octave_quit (); for (octave_idx_type i = a.cidx (j); i < a.cidx (j+1); i++) { - os << a.ridx (i) + 1 << " " << j + 1 << " "; + os << a.ridx (i) + 1 << ' ' << j + 1 << ' '; octave_write_complex (os, a.data (i)); os << "\n"; }
--- a/liboctave/array/Range.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/Range.cc Fri Jul 28 15:40:00 2017 -0700 @@ -341,9 +341,9 @@ if (num_elem > 1) { // First element must be the base *exactly* (-0). - os << b << " "; + os << b << ' '; for (octave_idx_type i = 1; i < num_elem-1; i++) - os << b + i * increment << " "; + os << b + i * increment << ' '; } // Print out exactly the last element, rather than a calculated last element.
--- a/liboctave/array/boolSparse.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/boolSparse.cc Fri Jul 28 15:40:00 2017 -0700 @@ -269,7 +269,7 @@ { octave_quit (); for (octave_idx_type i = a.cidx (j); i < a.cidx (j+1); i++) - os << a.ridx (i) + 1 << " " << j + 1 << " " << a.data (i) << "\n"; + os << a.ridx (i) + 1 << ' ' << j + 1 << ' ' << a.data (i) << "\n"; } return os;
--- a/liboctave/array/dDiagMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/dDiagMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -336,9 +336,9 @@ for (octave_idx_type j = 0; j < a.cols (); j++) { if (i == j) - os << " " /* setw (field_width) */ << a.elem (i, i); + os << ' ' /* setw (field_width) */ << a.elem (i, i); else - os << " " /* setw (field_width) */ << 0.0; + os << ' ' /* setw (field_width) */ << 0.0; } os << "\n"; }
--- a/liboctave/array/dMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/dMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -2799,7 +2799,7 @@ { for (octave_idx_type j = 0; j < a.cols (); j++) { - os << " "; + os << ' '; octave_write_double (os, a.elem (i, j)); } os << "\n";
--- a/liboctave/array/dNDArray.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/dNDArray.cc Fri Jul 28 15:40:00 2017 -0700 @@ -860,7 +860,7 @@ for (octave_idx_type i = 0; i < nel; i++) { - os << " "; + os << ' '; octave_write_double (os, a.elem (i)); os << "\n"; }
--- a/liboctave/array/dRowVector.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/dRowVector.cc Fri Jul 28 15:40:00 2017 -0700 @@ -237,7 +237,7 @@ // int field_width = os.precision () + 7; for (octave_idx_type i = 0; i < a.numel (); i++) - os << " " /* setw (field_width) */ << a.elem (i); + os << ' ' /* setw (field_width) */ << a.elem (i); return os; }
--- a/liboctave/array/dSparse.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/dSparse.cc Fri Jul 28 15:40:00 2017 -0700 @@ -5837,8 +5837,8 @@ CHOLMOD_NAME(free_dense) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -6076,8 +6076,8 @@ CHOLMOD_NAME(free_sparse) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -6332,8 +6332,8 @@ CHOLMOD_NAME(free_dense) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -6593,8 +6593,8 @@ CHOLMOD_NAME(free_sparse) (&X, cm); CHOLMOD_NAME(free_factor) (&L, cm); CHOLMOD_NAME(finish) (cm); - static char tmp[] = " "; - CHOLMOD_NAME(print_common) (tmp, cm); + static char blank_name[] = " "; + CHOLMOD_NAME(print_common) (blank_name, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } #else @@ -7487,7 +7487,7 @@ octave_quit (); for (octave_idx_type i = a.cidx (j); i < a.cidx (j+1); i++) { - os << a.ridx (i) + 1 << " " << j + 1 << " "; + os << a.ridx (i) + 1 << ' ' << j + 1 << ' '; octave_write_double (os, a.data (i)); os << "\n"; }
--- a/liboctave/array/fCDiagMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fCDiagMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -506,9 +506,9 @@ for (octave_idx_type j = 0; j < a.cols (); j++) { if (i == j) - os << " " /* setw (field_width) */ << a.elem (i, i); + os << ' ' /* setw (field_width) */ << a.elem (i, i); else - os << " " /* setw (field_width) */ << ZERO; + os << ' ' /* setw (field_width) */ << ZERO; } os << "\n"; }
--- a/liboctave/array/fCMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fCMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -3359,7 +3359,7 @@ { for (octave_idx_type j = 0; j < a.cols (); j++) { - os << " "; + os << ' '; octave_write_complex (os, a.elem (i, j)); } os << "\n";
--- a/liboctave/array/fCNDArray.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fCNDArray.cc Fri Jul 28 15:40:00 2017 -0700 @@ -844,7 +844,7 @@ for (octave_idx_type i = 0; i < nel; i++) { - os << " "; + os << ' '; octave_write_complex (os, a.elem (i)); os << "\n"; }
--- a/liboctave/array/fCRowVector.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fCRowVector.cc Fri Jul 28 15:40:00 2017 -0700 @@ -366,7 +366,7 @@ { // int field_width = os.precision () + 7; for (octave_idx_type i = 0; i < a.numel (); i++) - os << " " /* setw (field_width) */ << a.elem (i); + os << ' ' /* setw (field_width) */ << a.elem (i); return os; }
--- a/liboctave/array/fDiagMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fDiagMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -336,9 +336,9 @@ for (octave_idx_type j = 0; j < a.cols (); j++) { if (i == j) - os << " " /* setw (field_width) */ << a.elem (i, i); + os << ' ' /* setw (field_width) */ << a.elem (i, i); else - os << " " /* setw (field_width) */ << 0.0; + os << ' ' /* setw (field_width) */ << 0.0; } os << "\n"; }
--- a/liboctave/array/fMatrix.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fMatrix.cc Fri Jul 28 15:40:00 2017 -0700 @@ -2806,7 +2806,7 @@ { for (octave_idx_type j = 0; j < a.cols (); j++) { - os << " "; + os << ' '; octave_write_float (os, a.elem (i, j)); } os << "\n";
--- a/liboctave/array/fNDArray.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fNDArray.cc Fri Jul 28 15:40:00 2017 -0700 @@ -823,7 +823,7 @@ for (octave_idx_type i = 0; i < nel; i++) { - os << " "; + os << ' '; octave_write_float (os, a.elem (i)); os << "\n"; }
--- a/liboctave/array/fRowVector.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/fRowVector.cc Fri Jul 28 15:40:00 2017 -0700 @@ -237,7 +237,7 @@ // int field_width = os.precision () + 7; for (octave_idx_type i = 0; i < a.numel (); i++) - os << " " /* setw (field_width) */ << a.elem (i); + os << ' ' /* setw (field_width) */ << a.elem (i); return os; }
--- a/liboctave/array/idx-vector.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/idx-vector.cc Fri Jul 28 15:40:00 2017 -0700 @@ -110,7 +110,7 @@ std::ostream& idx_vector::idx_colon_rep::print (std::ostream& os) const { - return os << ":"; + return os << ':'; } idx_vector::idx_range_rep::idx_range_rep (octave_idx_type _start,
--- a/liboctave/array/intNDArray.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/array/intNDArray.cc Fri Jul 28 15:40:00 2017 -0700 @@ -145,7 +145,7 @@ octave_idx_type nel = a.numel (); for (octave_idx_type i = 0; i < nel; i++) - os << " " << a.elem (i) << "\n"; + os << ' ' << a.elem (i) << "\n"; return os; }
--- a/liboctave/numeric/CollocWt.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/numeric/CollocWt.cc Fri Jul 28 15:40:00 2017 -0700 @@ -494,7 +494,7 @@ os << "\n"; - os << a.Alpha << " " << a.Beta << "\n\n" + os << a.Alpha << ' ' << a.Beta << "\n\n" << a.r << "\n\n" << a.q << "\n\n" << a.A << "\n"
--- a/liboctave/numeric/DASPK.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/numeric/DASPK.cc Fri Jul 28 15:40:00 2017 -0700 @@ -724,7 +724,7 @@ case -1: retval = std::string ("a large amount of work has been expended (t =") - + t_curr + ")"; + + t_curr + ')'; break; case -2: @@ -739,17 +739,17 @@ case -6: retval = std::string ("repeated error test failures on the last attempted step (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -7: retval = std::string ("the corrector could not converge (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -8: retval = std::string ("the matrix of partial derivatives is singular (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -9: @@ -759,12 +759,12 @@ case -10: retval = std::string ("corrector could not converge because IRES was -1 (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -11: retval = std::string ("return requested in user-supplied function (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -12: @@ -773,12 +773,12 @@ case -13: retval = std::string ("unrecoverable error encountered inside user's PSOL function (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -14: retval = std::string ("the Krylov linear system solver failed to converge (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -33:
--- a/liboctave/numeric/DASRT.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/numeric/DASRT.cc Fri Jul 28 15:40:00 2017 -0700 @@ -587,7 +587,7 @@ case -1: retval = std::string ("a large amount of work has been expended (t =") - + t_curr + ")"; + + t_curr + ')'; break; case -2: @@ -602,17 +602,17 @@ case -6: retval = std::string ("repeated error test failures on the last attempted step (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -7: retval = std::string ("the corrector could not converge (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -8: retval = std::string ("the matrix of partial derivatives is singular (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -9: @@ -622,12 +622,12 @@ case -10: retval = std::string ("corrector could not converge because IRES was -1 (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -11: retval = std::string ("return requested in user-supplied function (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -12:
--- a/liboctave/numeric/DASSL.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/numeric/DASSL.cc Fri Jul 28 15:40:00 2017 -0700 @@ -525,7 +525,7 @@ case -1: retval = std::string ("a large amount of work has been expended (t =") - + t_curr + ")"; + + t_curr + ')'; break; case -2: @@ -540,17 +540,17 @@ case -6: retval = std::string ("repeated error test failures on the last attempted step (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -7: retval = std::string ("the corrector could not converge (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -8: retval = std::string ("the matrix of partial derivatives is singular (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -9: @@ -560,12 +560,12 @@ case -10: retval = std::string ("corrector could not converge because IRES was -1 (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -11: retval = std::string ("return requested in user-supplied function (t = ") - + t_curr + ")"; + + t_curr + ')'; break; case -12:
--- a/liboctave/numeric/LSODE.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/numeric/LSODE.cc Fri Jul 28 15:40:00 2017 -0700 @@ -364,7 +364,7 @@ case -13: retval = "return requested in user-supplied function (t = " - + t_curr + ")"; + + t_curr + ')'; break; default:
--- a/liboctave/system/oct-time.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/system/oct-time.cc Fri Jul 28 15:40:00 2017 -0700 @@ -96,7 +96,7 @@ { preserve_stream_state stream_state (os); - os << ot.ot_unix_time << "." + os << ot.ot_unix_time << '.' << std::setw (6) << std::setfill ('0') << ot.ot_usec; return os;
--- a/liboctave/util/cmd-hist.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/util/cmd-hist.cc Fri Jul 28 15:40:00 2017 -0700 @@ -129,7 +129,7 @@ beg++; else { - size_t end = control_arg.find (":", beg); + size_t end = control_arg.find (':', beg); if (end == std::string::npos) end = len; @@ -169,7 +169,7 @@ if (history_control & HC_IGNDUPS) { if (retval.length () > 0) - retval.append (":"); + retval += ':'; retval.append ("ignoredups"); } @@ -177,7 +177,7 @@ if (history_control & HC_ERASEDUPS) { if (retval.length () > 0) - retval.append (":"); + retval += ':'; retval.append ("erasedups"); }
--- a/liboctave/util/kpse.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/util/kpse.cc Fri Jul 28 15:40:00 2017 -0700 @@ -266,7 +266,7 @@ for (const auto& filename : filenames) { octave::sys::time now; - std::cerr << now.unix_time () << " " << filename << std::endl; + std::cerr << now.unix_time () << ' ' << filename << std::endl; } } } @@ -562,7 +562,7 @@ std::cerr << ", " << *p; } - std::cerr << "), path=" << path << "." << std::endl; + std::cerr << "), path=" << path << '.' << std::endl; } for (const auto& name : names)
--- a/liboctave/util/lo-array-errwarn.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/util/lo-array-errwarn.cc Fri Jul 28 15:40:00 2017 -0700 @@ -136,7 +136,7 @@ { if (dim < 5) { - buf << "("; + buf << '('; for (octave_idx_type i = 1; i < dim; i++) buf << "_,"; @@ -155,7 +155,7 @@ buf << ",_"; if (nd >= dim) - buf << ")"; + buf << ')'; } else buf << "...[x" << nd - dim << "]...)";
--- a/liboctave/util/lo-regexp.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/util/lo-regexp.cc Fri Jul 28 15:40:00 2017 -0700 @@ -184,7 +184,7 @@ who.c_str (), MAXLOOKBEHIND); } - buf << pattern.substr (pos, new_pos - pos) << "("; + buf << pattern.substr (pos, new_pos - pos) << '('; size_t i; @@ -196,13 +196,13 @@ for (; i < max_length + 1; i++) { buf << pattern.substr (new_pos, tmp_pos3 - new_pos) - << "{" << i << "}"; + << '{' << i << '}'; buf << pattern.substr (tmp_pos3 + 1, tmp_pos1 - tmp_pos3 - 1); if (i != max_length) - buf << "|"; + buf << '|'; } - buf << ")"; + buf << ')'; } else buf << pattern.substr (pos, tmp_pos1 - pos);
--- a/liboctave/util/lo-utils.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/util/lo-utils.cc Fri Jul 28 15:40:00 2017 -0700 @@ -397,11 +397,11 @@ void octave_write_complex (std::ostream& os, const Complex& c) { - os << "("; + os << '('; octave_write_double (os, real (c)); - os << ","; + os << ','; octave_write_double (os, imag (c)); - os << ")"; + os << ')'; } void @@ -420,9 +420,9 @@ void octave_write_float_complex (std::ostream& os, const FloatComplex& c) { - os << "("; + os << '('; octave_write_float (os, real (c)); - os << ","; + os << ','; octave_write_float (os, imag (c)); - os << ")"; + os << ')'; }
--- a/liboctave/util/str-vec.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/util/str-vec.cc Fri Jul 28 15:40:00 2017 -0700 @@ -257,7 +257,7 @@ octave_idx_type spaces_to_pad = max_name_length - name_length; for (octave_idx_type i = 0; i < spaces_to_pad; i++) - os << " "; + os << ' '; pos += max_name_length; } os << "\n";
--- a/liboctave/util/url-transfer.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/liboctave/util/url-transfer.cc Fri Jul 28 15:40:00 2017 -0700 @@ -434,7 +434,7 @@ void put (const std::string& file, std::istream& is) { - url = "ftp://" + host_or_url + "/" + file; + url = "ftp://" + host_or_url + '/' + file; SETOPT (CURLOPT_URL, url.c_str ()); SETOPT (CURLOPT_UPLOAD, 1); SETOPT (CURLOPT_NOBODY, 0); @@ -453,7 +453,7 @@ void get (const std::string& file, std::ostream& os) { - url = "ftp://" + host_or_url + "/" + file; + url = "ftp://" + host_or_url + '/' + file; SETOPT (CURLOPT_URL, url.c_str ()); SETOPT (CURLOPT_NOBODY, 0); std::ostream& old_os = set_ostream (os); @@ -470,7 +470,7 @@ void dir (void) { - url = "ftp://" + host_or_url + "/"; + url = "ftp://" + host_or_url + '/'; SETOPT (CURLOPT_URL, url.c_str ()); SETOPT (CURLOPT_NOBODY, 0); @@ -488,7 +488,7 @@ string_vector retval; std::ostringstream buf; - url = "ftp://" + host_or_url + "/"; + url = "ftp://" + host_or_url + '/'; SETOPTR (CURLOPT_WRITEDATA, static_cast<void *> (&buf)); SETOPTR (CURLOPT_URL, url.c_str ()); SETOPTR (CURLOPT_DIRLISTONLY, 1); @@ -536,7 +536,7 @@ { std::string path = pwd (); - url = "ftp://" + host_or_url + "/" + path + "/" + filename; + url = "ftp://" + host_or_url + '/' + path + '/' + filename; SETOPT (CURLOPT_URL, url.c_str ()); SETOPT (CURLOPT_FILETIME, 1); SETOPT (CURLOPT_HEADERFUNCTION, throw_away); @@ -575,7 +575,7 @@ // servers I tested with, so cd again into the correct path. Make // the path absolute so that this will work even with servers that // don't end up in the root after an MDTM command. - cwd ("/" + path); + cwd ('/' + path); } std::string pwd (void) @@ -619,7 +619,7 @@ std::string query_string = form_query_string (param); if (! query_string.empty ()) - url += "?" + query_string; + url += '?' + query_string; SETOPT (CURLOPT_URL, url.c_str ()); @@ -683,7 +683,7 @@ // Set the username and password userpwd = user; if (! passwd.empty ()) - userpwd += ":" + passwd; + userpwd += ':' + passwd; if (! userpwd.empty ()) SETOPT (CURLOPT_USERPWD, userpwd.c_str ()); @@ -729,13 +729,13 @@ char *enc_text = curl_easy_escape (curl, text.c_str (), text.length ()); - query << enc_name << "=" << enc_text; + query << enc_name << '=' << enc_text; curl_free (enc_name); curl_free (enc_text); if (i < param.numel ()-1) - query << "&"; + query << '&'; } query.flush (); @@ -752,7 +752,7 @@ frame.add_fcn (curl_slist_free_all, slist); - std::string cmd = action + " " + file_or_dir; + std::string cmd = action + ' ' + file_or_dir; slist = curl_slist_append (slist, cmd.c_str ());
--- a/src/main-cli.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/src/main-cli.cc Fri Jul 28 15:40:00 2017 -0700 @@ -60,7 +60,7 @@ << octave_id << ") does not match liboctave hg id (" << liboctave_id - << ")" << std::endl; + << ')' << std::endl; ok = false; } @@ -70,7 +70,7 @@ << octave_id << ") does not match liboctinterp hg id (" << liboctinterp_id - << ")" << std::endl; + << ')' << std::endl; ok = false; }
--- a/src/main-gui.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/src/main-gui.cc Fri Jul 28 15:40:00 2017 -0700 @@ -64,7 +64,7 @@ << octave_id << ") does not match liboctave hg id (" << liboctave_id - << ")" << std::endl; + << ')' << std::endl; ok = false; } @@ -74,7 +74,7 @@ << octave_id << ") does not match liboctinterp hg id (" << liboctinterp_id - << ")" << std::endl; + << ')' << std::endl; ok = false; } @@ -84,7 +84,7 @@ << octave_id << ") does not match liboctgui hg id (" << liboctgui_id - << ")" << std::endl; + << ')' << std::endl; ok = false; }
--- a/src/mkoctfile.in.cc Fri Jul 28 11:45:07 2017 -0700 +++ b/src/mkoctfile.in.cc Fri Jul 28 15:40:00 2017 -0700 @@ -260,23 +260,23 @@ vars["F77_INTEGER8_FLAG"] = get_variable ("F77_INTEGER8_FLAG", %OCTAVE_CONF_F77_INTEGER_8_FLAG%); - vars["ALL_FFLAGS"] = vars["FFLAGS"] + " " + vars["F77_INTEGER8_FLAG"]; + vars["ALL_FFLAGS"] = vars["FFLAGS"] + ' ' + vars["F77_INTEGER8_FLAG"]; vars["ALL_CFLAGS"] - = vars["INCFLAGS"] + " " + vars["XTRA_CFLAGS"] + " " + vars["CFLAGS"]; + = vars["INCFLAGS"] + ' ' + vars["XTRA_CFLAGS"] + ' ' + vars["CFLAGS"]; vars["ALL_CXXFLAGS"] - = vars["INCFLAGS"] + " " + vars["XTRA_CXXFLAGS"] + " " + vars["CXXFLAGS"]; + = vars["INCFLAGS"] + ' ' + vars["XTRA_CXXFLAGS"] + ' ' + vars["CXXFLAGS"]; vars["ALL_LDFLAGS"] - = vars["LD_STATIC_FLAG"] + " " + vars["CPICFLAG"] + " " + vars["LDFLAGS"]; + = vars["LD_STATIC_FLAG"] + ' ' + vars["CPICFLAG"] + ' ' + vars["LDFLAGS"]; vars["OCTAVE_LIBS"] - = (vars["LIBOCTINTERP"] + " " + vars["LIBOCTAVE"] + " " + = (vars["LIBOCTINTERP"] + ' ' + vars["LIBOCTAVE"] + ' ' + vars["SPECIAL_MATH_LIB"]); - vars["FFTW_LIBS"] = vars["FFTW3_LDFLAGS"] + " " + vars["FFTW3_LIBS"] + " " - + vars["FFTW3F_LDFLAGS"] + " " + vars["FFTW3F_LIBS"]; + vars["FFTW_LIBS"] = vars["FFTW3_LDFLAGS"] + ' ' + vars["FFTW3_LIBS"] + ' ' + + vars["FFTW3F_LDFLAGS"] + ' ' + vars["FFTW3F_LIBS"]; } static std::string usage_msg = "usage: mkoctfile [options] file ..."; @@ -509,12 +509,12 @@ else if (ends_with (arg, ".o") || ends_with (arg, ".obj")) { file = arg; - objfiles += (" " + quote_path (arg)); + objfiles += (' ' + quote_path (arg)); } else if (ends_with (arg, ".lib") || ends_with (arg, ".a")) { file = arg; - libfiles += (" " + quote_path (arg)); + libfiles += (' ' + quote_path (arg)); } else if (arg == "-d" || arg == "-debug" || arg == "--debug" || arg == "-v" || arg == "-verbose" || arg == "--verbose") @@ -535,7 +535,7 @@ } else if (starts_with (arg, "-I")) { - incflags += (" " + quote_path (arg)); + incflags += (' ' + quote_path (arg)); } else if (arg == "-idirafter") { @@ -550,7 +550,7 @@ } else if (starts_with (arg, "-D")) { - defs += (" " + arg); + defs += (' ' + arg); } else if (arg == "-largeArrayDims" || arg == "-compatibleArrayDims") { @@ -559,12 +559,12 @@ else if (starts_with (arg, "-Wl,") || starts_with (arg, "-l") || starts_with (arg, "-L") || starts_with (arg, "-R")) { - ldflags += (" " + arg); + ldflags += (' ' + arg); } #if ! defined (OCTAVE_USE_WINDOWS_API) else if (arg == "-pthread") { - ldflags += (" " + arg); + ldflags += (' ' + arg); } #endif else if (arg == "-M" || arg == "-depend" || arg == "--depend") @@ -628,12 +628,12 @@ } else if (starts_with (arg, "-W")) { - pass_on_options += (" " + arg); + pass_on_options += (' ' + arg); } else if (starts_with (arg, "-")) { // Pass through any unrecognized options - pass_on_options += (" " + arg); + pass_on_options += (' ' + arg); } else { @@ -681,9 +681,9 @@ octave_unlink_wrapper (dfile.c_str ()); std::string cmd - = (vars["CC"] + " " + vars["DEPEND_FLAGS"] + " " - + vars["CPPFLAGS"] + " " + vars["ALL_CFLAGS"] + " " - + incflags + " " + defs + " " + quote_path (f)); + = (vars["CC"] + ' ' + vars["DEPEND_FLAGS"] + ' ' + + vars["CPPFLAGS"] + ' ' + vars["ALL_CFLAGS"] + ' ' + + incflags + ' ' + defs + ' ' + quote_path (f)); FILE *fd = popen (cmd.c_str (), "r"); std::ofstream fo (dfile.c_str ()); @@ -698,7 +698,7 @@ (spos == std::string::npos ? line.substr (0, pos+2) : line.substr (spos+1, pos-spos+1)); - fo << "pic/" << ofile << " " << ofile << " " + fo << "pic/" << ofile << ' ' << ofile << ' ' << dfile << line.substr (pos) << std::endl; } else @@ -715,9 +715,9 @@ octave_unlink_wrapper (dfile.c_str ()); std::string cmd - = (vars["CXX"] + " " + vars["DEPEND_FLAGS"] + " " - + vars["CPPFLAGS"] + " " + vars["ALL_CXXFLAGS"] + " " - + incflags + " " + defs + " " + quote_path (f)); + = (vars["CXX"] + ' ' + vars["DEPEND_FLAGS"] + ' ' + + vars["CPPFLAGS"] + ' ' + vars["ALL_CXXFLAGS"] + ' ' + + incflags + ' ' + defs + ' ' + quote_path (f)); FILE *fd = popen (cmd.c_str (), "r"); std::ofstream fo (dfile.c_str ()); @@ -732,7 +732,7 @@ (spos == std::string::npos ? line.substr (0, pos+2) : line.substr (spos+1, pos-spos+1)); - fo << "pic/" << ofile << " " << ofile << " " + fo << "pic/" << ofile << ' ' << ofile << ' ' << dfile << line.substr (pos+2) << std::endl; } else @@ -761,12 +761,12 @@ } else o = b + ".o"; - objfiles += (" " + o); + objfiles += (' ' + o); std::string cmd - = (vars["F77"] + " -c " + vars["FPICFLAG"] + " " - + vars["ALL_FFLAGS"] + " " + incflags + " " + defs + " " - + pass_on_options + " " + f + " -o " + o); + = (vars["F77"] + " -c " + vars["FPICFLAG"] + ' ' + + vars["ALL_FFLAGS"] + ' ' + incflags + ' ' + defs + ' ' + + pass_on_options + ' ' + f + " -o " + o); int status = run_command (cmd, printonly); @@ -795,12 +795,12 @@ } else o = b + ".o"; - objfiles += (" " + o); + objfiles += (' ' + o); std::string cmd - = (vars["CC"] + " -c " + vars["CPPFLAGS"] + " " - + vars["CPICFLAG"] + " " + vars["ALL_CFLAGS"] + " " - + pass_on_options + " " + incflags + " " + defs + " " + = (vars["CC"] + " -c " + vars["CPPFLAGS"] + ' ' + + vars["CPICFLAG"] + ' ' + vars["ALL_CFLAGS"] + ' ' + + pass_on_options + ' ' + incflags + ' ' + defs + ' ' + quote_path (f) + " -o " + quote_path (o)); int status = run_command (cmd, printonly); @@ -830,12 +830,12 @@ } else o = b + ".o"; - objfiles += (" " + o); + objfiles += (' ' + o); std::string cmd - = (vars["CXX"] + " -c " + vars["CPPFLAGS"] + " " - + vars["CXXPICFLAG"] + " " + vars["ALL_CXXFLAGS"] + " " - + pass_on_options + " " + incflags + " " + defs + " " + = (vars["CXX"] + " -c " + vars["CPPFLAGS"] + ' ' + + vars["CXXPICFLAG"] + ' ' + vars["ALL_CXXFLAGS"] + ' ' + + pass_on_options + ' ' + incflags + ' ' + defs + ' ' + quote_path (f) + " -o " + quote_path (o)); int status = run_command (cmd, printonly); @@ -858,12 +858,12 @@ if (! vars["LD_CXX"].empty ()) { std::string cmd - = (vars["LD_CXX"] + " " + vars["CPPFLAGS"] + " " - + vars["ALL_CXXFLAGS"] + " " + vars["RDYNAMIC_FLAG"] + " " - + vars["ALL_LDFLAGS"] + " " + pass_on_options + " " - + output_option + " " + objfiles + " " + libfiles + " " - + ldflags + " " + vars["LFLAGS"] + " -loctinterp -loctave " - + vars["OCTAVE_LINK_OPTS"] + " " + vars["OCTAVE_LINK_DEPS"]); + = (vars["LD_CXX"] + ' ' + vars["CPPFLAGS"] + ' ' + + vars["ALL_CXXFLAGS"] + ' ' + vars["RDYNAMIC_FLAG"] + ' ' + + vars["ALL_LDFLAGS"] + ' ' + pass_on_options + ' ' + + output_option + ' ' + objfiles + ' ' + libfiles + ' ' + + ldflags + ' ' + vars["LFLAGS"] + " -loctinterp -loctave " + + vars["OCTAVE_LINK_OPTS"] + ' ' + vars["OCTAVE_LINK_DEPS"]); int status = run_command (cmd, printonly); @@ -881,11 +881,11 @@ else { std::string cmd - = (vars["DL_LD"] + " " + vars["ALL_CXXFLAGS"] + " " - + vars["DL_LDFLAGS"] + " " + pass_on_options - + " -o " + octfile + " " + objfiles + " " + libfiles + " " - + ldflags + " " + vars["LFLAGS"] + " -loctinterp -loctave " - + vars["OCT_LINK_OPTS"] + " " + vars["OCT_LINK_DEPS"]); + = (vars["DL_LD"] + ' ' + vars["ALL_CXXFLAGS"] + ' ' + + vars["DL_LDFLAGS"] + ' ' + pass_on_options + + " -o " + octfile + ' ' + objfiles + ' ' + libfiles + ' ' + + ldflags + ' ' + vars["LFLAGS"] + " -loctinterp -loctave " + + vars["OCT_LINK_OPTS"] + ' ' + vars["OCT_LINK_DEPS"]); int status = run_command (cmd, printonly);