const AttachmentStrategy * AttachmentStrategy::create( const QString & type ) {
  QString lowerType = type.toLower();
  if ( lowerType == "iconic" )  return iconic();
  //if ( lowerType == "smart" )   return smart(); // not needed, see below
  if ( lowerType == "inlined" ) return inlined();
  if ( lowerType == "hidden" )  return hidden();
  // don't kFatal here, b/c the strings are user-provided
  // (KConfig), so fail gracefully to the default:
  return smart();
}
示例#2
0
void testInlined() {
  extern int coin();
  int cond = coin();
  if (!cond) {
    inlined(0);
    if (cond) {
      foo(5); // expected-warning {{never executed}}
    }
  }
}
const AttachmentStrategy * AttachmentStrategy::create( Type type ) {
  switch ( type ) {
  case Iconic:  return iconic();
  case Smart:   return smart();
  case Inlined: return inlined();
  case Hidden:  return hidden();
  }
  kFatal( 5006 ) << "Unknown attachment startegy ( type =="
                  << (int)type << ") requested!";
  return 0; // make compiler happy
}
 const AttachmentStrategy * next() const { return inlined(); }
 const AttachmentStrategy * prev() const { return inlined(); }
示例#6
0
文件: inline-3.c 项目: AlexMioMio/gcc
void
inline_me (void)
{
  inlined();
}
示例#7
0
文件: inline-3.c 项目: AlexMioMio/gcc
void
inline_me_too (void)
{
  inlined();
}